[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clean-temp: add support for temporary files anywhere
From: |
Bruno Haible |
Subject: |
clean-temp: add support for temporary files anywhere |
Date: |
Sat, 04 Jul 2020 15:30:57 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) |
Sometimes, temporary files are better placed in temporary subdirectories,
so that you have full control over the file names and access permissions.
But sometimes, temporary files are better placed in a given directory,
so that you can be sure that a 'rename' to another name in the same
directory will succeed.
These two patches add support for creating temporary files at a given
place, with automatic cleanup.
And some documentation improvement.
2020-07-04 Bruno Haible <bruno@clisp.org>
clean-temp: Document limitations.
* lib/clean-temp.h: Document limitations.
2020-07-04 Bruno Haible <bruno@clisp.org>
clean-temp: Add support for temporary files with unpredictable names.
* lib/clean-temp.h (gen_register_open_temp): New declaration.
* lib/clean-temp.c: Include tempname.h.
(gen_register_open_temp): New function.
* modules/tempname (configure.ac): Define a module indicator.
2020-07-04 Bruno Haible <bruno@clisp.org>
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.
0001-clean-temp-Add-support-for-temporary-files-anywhere-.patch
Description: Text Data
0002-clean-temp-Add-support-for-temporary-files-with-unpr.patch
Description: Text Data
0003-clean-temp-Document-limitations.patch
Description: Text Data
- clean-temp: add support for temporary files anywhere,
Bruno Haible <=