]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
*** empty log message ***
authorJim Meyering <jim@meyering.net>
Sat, 16 Aug 2003 17:39:51 +0000 (17:39 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 16 Aug 2003 17:39:51 +0000 (17:39 +0000)
ChangeLog

index 7daa0f75f1fcfdccc216efb4597095befdc649e1..2e36ba081d78725406dadbc9a776431fb2462aa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,25 @@
-2003-08-15  Jim Meyering  <jim@meyering.net>
+2003-08-16  Jim Meyering  <jim@meyering.net>
 
        * Version 5.0.91.
 
+       * src/tail.c (tail_lines): Fix a potential (but very hard to exercise)
+       race condition bug.  The bug would be triggered when tailing a file
+       with file pointer not at beginning of file, and where the file was
+       truncated to have a length of less than the initial offset at just
+       the right moment (between the two lseek calls in this function).
+
+       An invalid initial value for *read_pos would result in
+       `tail -n0 -f FILE' and `tail -c0 -f FILE' doing what amounted to a
+       busy-wait rather than sleeping between iterations.  The bug manifests
+       itself only when tailing regular files that are initially nonempty.
+       * src/tail.c (tail_bytes): Set *read_pos to new file offset after
+       each xlseek call.
+       (tail_lines): Likewise, after lseek calls.
+       Reported by Nick Estes.  See http://bugs.debian.org/205251 for details.
+       * tests/tail-2/tail-n0f: New file.  Test for above fix.
+
+2003-08-15  Jim Meyering  <jim@meyering.net>
+
        * Makefile.maint (sc_space_tab): Use exclusion list in separate file.
        (sc_sun_os_names): Likewise.
        * .x-sc_space_tab, .x-sc_sun_os_names: New files.