From 564370e171d3e503d10463288bee2ff5273b2a33 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Jul 2020 15:22:33 +0200 Subject: [PATCH] clean-temp: Document limitations. * lib/clean-temp.h: Document limitations. --- ChangeLog | 5 +++++ lib/clean-temp.h | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b488710f9..8e0408c019 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-07-04 Bruno Haible + + clean-temp: Document limitations. + * lib/clean-temp.h: Document limitations. + 2020-07-04 Bruno Haible clean-temp: Add support for temporary files with unpredictable names. diff --git a/lib/clean-temp.h b/lib/clean-temp.h index 087db452d1..df7e7442c0 100644 --- a/lib/clean-temp.h +++ b/lib/clean-temp.h @@ -49,7 +49,17 @@ extern "C" { For the cleanup in the normal case, programs that use this module need to call 'cleanup_temp_dir' for each successful return of 'create_temp_dir'. The cleanup in the case of a fatal signal such as SIGINT, SIGTERM, SIGHUP, - is done entirely automatically by the functions of this module. */ + is done entirely automatically by the functions of this module. + + Limitations: Files or directories can still be left over if + - the program is dies from a fatal signal such as SIGQUIT, SIGKILL, or + SIGABRT, SIGSEGV, SIGBUS, SIGILL, SIGFPE, or + - in a multithreaded program, the fatal signal handler is already running + while another thread of the program creates a new temporary directory + or temporary file, or + - on native Windows, some temporary files are used by a subprocess while + the fatal signal interrupts the program. + */ /* ============= Temporary files without temporary directories ============= */ -- 2.39.5