This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] support: Prevent multiple deletion of temporary files
- From: Andreas Schwab <schwab at suse dot de>
- To: fweimer at redhat dot com (Florian Weimer)
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 08 May 2017 16:18:57 +0200
- Subject: Re: [PATCH] support: Prevent multiple deletion of temporary files
- Authentication-results: sourceware.org; auth=none
- References: <20170508135357.16D1E40257329@oldenburg.str.redhat.com>
On Mai 08 2017, fweimer@redhat.com (Florian Weimer) wrote:
> Prevent multiple deletion of temporary files.
> * support/temp_file.c (struct temp_name_list): Add owner member.
> (add_temp_file): Record owner.
> (support_delete_temp_files): Delete file only if owner matches.
> * posix/tst-exec.c (temp_fd1, temp_fd2): Define.
> (do_prepare): Use create_temp_file instead of add_temp_file.
> Initialize temp_fd1, temp_fd2.
> (do_test): Use global temp_fd1, temp_fd2 variables. Let the test
> framework remove the temporary files.
> * posix/tst-exec.c (temp_fd1, temp_fd2, temp_fd3): Define.
> (do_prepare): Use create_temp_file instead of add_temp_file.
> Initialize temp_fd1, temp_fd2, temp_fd3.
> (do_test): Use global temp_fd1, temp_fd2, temp_fd3 variables. Let
> the test framework remove the temporary files.
> * posix/tst-vfork3.c (do_prepare): Adjust for LIFO order of file
> deletion.
> * posix/tst-pathconf.c (do_test): Do not call rmdir on the
> temporary directory. It is removed by the test framework.
> * dirent/tst-scandir.c (do_test): Likewise.
Ok.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."