]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[DONT_UNLINK_WHILE_OPEN]: Add a FIXME comment explaining that
authorJim Meyering <jim@meyering.net>
Tue, 14 Dec 2004 10:28:03 +0000 (10:28 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 14 Dec 2004 10:28:03 +0000 (10:28 +0000)
using atexit like this is wrong.

src/tac.c

index ba206c1eff19f7118efffbc7e3dba2ac5e603200..4f6fb229a1d2714e3a1761582b38403b38132682 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -375,6 +375,12 @@ tac_seekable (int input_fd, const char *file)
 
 #if DONT_UNLINK_WHILE_OPEN
 
+/* FIXME-someday: remove all of this DONT_UNLINK_WHILE_OPEN junk.
+   Using atexit like this is wrong, since it can fail
+   when called e.g. 32 or more times.
+   But this isn't a big deal, since the code is used only on WOE/DOS
+   systems, and few people invoke tac on that many nonseekable files.  */
+
 static const char *file_to_remove;
 static FILE *fp_to_close;