]> Savannah Git Hosting - gnulib.git/commit
clean-temp: Add support for temporary files anywhere in the file system.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Jul 2020 13:17:32 +0000 (15:17 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Jul 2020 13:17:32 +0000 (15:17 +0200)
commit629e348003127a1d780fc2edf4f5d38f42e09fb9
treeffe544658592efb28bd6f83062c3546a6f9dda7e
parentc1fb786d149b8a686eda4d2e0efed5f1bc068b0c
clean-temp: Add support for temporary files anywhere in the file system.

* lib/clean-temp.h (register_temporary_file, unregister_temporary_file,
cleanup_temporary_file): New declarations.
* lib/clean-temp.c (file_cleanup_list_lock, file_cleanup_list): New
variables.
(dir_cleanup_list_lock): Renamed from cleanup_list_lock.
(dir_cleanup_list): Renamed from cleanup_list.
(cleanup_action): Process the file_cleanup_list as well.
(do_init_clean_temp): New function.
(clean_temp_once): New variable.
(init_clean_temp): New function.
(create_temp_dir): Invoke it.
(register_temporary_file, unregister_temporary_file,
cleanup_temporary_file): New functions.
(do_unlink, do_rmdir): Remove 'dir' argument. Add 'cleanup_verbose'
argument.
ChangeLog
lib/clean-temp.c
lib/clean-temp.h