<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/tail.c, branch v8.1</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.1</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-11-16T08:30:43Z</updated>
<entry>
<title>tail -F can fail to track a file after it's been rotated</title>
<updated>2009-11-16T08:30:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-15T08:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3b997a9bcb05198c880e5d1605a3c96c1d7f9c5d'/>
<id>urn:sha1:3b997a9bcb05198c880e5d1605a3c96c1d7f9c5d</id>
<content type='text'>
Tailing forever and by-name (--follow=name, -F), tail would
sometimes fail to follow a file that had been removed via rename.
If you can't apply this patch and have tail 7.6 or newer, you can
work around the bug via the undocumented --disable-inotify option.
* src/tail.c (tail_forever_inotify): When tailing by name (-F),
do not un-watch a file upon receipt of the IN_MOVE_SELF event.
Reported by Arjan Opmeer in http://bugs.debian.org/548439.
* NEWS (Bug fixes): Mention it.
Also see http://marc.info/?l=coreutils-bug&amp;m=125829031916515
* tests/Makefile.am (TESTS): Add tail-2/inotify-rotate.
* tests/tail-2/inotify-rotate: New test.
</content>
</entry>
<entry>
<title>tail -f: avoid a race condition</title>
<updated>2009-10-22T07:11:24Z</updated>
<author>
<name>Giuseppe Scrivano</name>
<email>gscrivano@gnu.org</email>
</author>
<published>2009-10-12T20:16:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cd0f3036f606276654f2293a4d90df5efd21bd99'/>
<id>urn:sha1:cd0f3036f606276654f2293a4d90df5efd21bd99</id>
<content type='text'>
* NEWS (Bug fixes): Mention it.
* src/tail.c (check_fspec): New function.
(tail_forever_inotify): Ensure there is no new data before entering the
inotify events wait loop.
</content>
</entry>
<entry>
<title>tail: add add missing backslash at the end of a line in usage</title>
<updated>2009-10-13T09:20:20Z</updated>
<author>
<name>C de-Avillez</name>
<email>hggdh2@gmail.com</email>
</author>
<published>2009-10-13T07:58:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b3cfa712ca5c28ad755f4a85147b32538766a417'/>
<id>urn:sha1:b3cfa712ca5c28ad755f4a85147b32538766a417</id>
<content type='text'>
* src/tail.c (usage): Add missing backslash at the end of a line.
</content>
</entry>
<entry>
<title>tail: tweak usage for more clarity</title>
<updated>2009-10-12T13:00:12Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-10-12T13:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f25273d7f1dd0f8aa6e839b2201e61222061efae'/>
<id>urn:sha1:f25273d7f1dd0f8aa6e839b2201e61222061efae</id>
<content type='text'>
* src/tail.c (usage): Spell out -n +K.
* THANKS: Update.
Reported by Jan-Pawel Wrozstinski.
</content>
</entry>
<entry>
<title>tail: avoid a race where we could miss new data with --pid</title>
<updated>2009-10-02T13:00:06Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-10-01T07:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f8726e05c4ec1141fb3ffad1c9ec3838f59182cb'/>
<id>urn:sha1:f8726e05c4ec1141fb3ffad1c9ec3838f59182cb</id>
<content type='text'>
* src/tail.c (tail_forever, tail_forever_inotify): Close a race in
tail_forever_inotify where new data written after the file check by
a now dead process, but before the pid check, is not output.  We use
the POSIX guarantee that read() and write() are serialized wrt each
other even in separate processes, to assume full file consistency
after exit() and so poll for new data _after_ the writer has exited.
This also allows us to not redundantly _wait_ for new data if the
process is dead.
* tests/tail-2/pid: Remove the now partially invalid sub second sleep
check as we now don't unconditionally wait, and replace it with a check
for the redundant sleep.  Also clarify some of the existing comments.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>maint: Use logical rather than bitwise operators on bools</title>
<updated>2009-09-23T13:33:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-23T09:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a037e838e15c9a698f1634398e0fe2726398d575'/>
<id>urn:sha1:a037e838e15c9a698f1634398e0fe2726398d575</id>
<content type='text'>
This is because bitwise operators are:
- confusing and inconsistent in a boolean context
- non short circuiting
- brittle in C89 where bool can be an int (so &gt; 1)
</content>
</entry>
<entry>
<title>doc: mention the texinfo documentation in --help</title>
<updated>2009-09-21T11:37:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-18T22:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5d4f09d83a7c69110b4db97443759e9046c149e1'/>
<id>urn:sha1:5d4f09d83a7c69110b4db97443759e9046c149e1</id>
<content type='text'>
* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
</content>
</entry>
<entry>
<title>tail: make the new piped-stdin test as portable as the old one</title>
<updated>2009-09-08T11:30:38Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-08T06:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f0ff8c73fe8ae505d2029e905b23ac534d11990c'/>
<id>urn:sha1:f0ff8c73fe8ae505d2029e905b23ac534d11990c</id>
<content type='text'>
* src/tail.c (main): Adapt piped-stdin test to use the same isapipe,
test as was used in the preceding POSIXLY_CORRECT condition.
Remove the now-subsumed POSIXLY_CORRECT test.
Reported by Pádraig Brady.
* doc/coreutils.texi (tail invocation): Document this change.
* NEWS (Changes in behavior): Reclassify, clarify.
</content>
</entry>
<entry>
<title>tail: syntax-only: use "false", rather than equivalent, 0</title>
<updated>2009-09-07T21:20:01Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T20:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f6d1f70183709124afd67462c05f82bb8d116165'/>
<id>urn:sha1:f6d1f70183709124afd67462c05f82bb8d116165</id>
<content type='text'>
* src/tail.c (record_open_fd): Initialize "-&gt;ignore" to false, not 0.
</content>
</entry>
<entry>
<title>tail: ignore -f for piped-stdin, as POSIX requires</title>
<updated>2009-09-07T21:19:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T20:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=af6436559c2954d7f35b7fec29dfcbaa4ebdc03b'/>
<id>urn:sha1:af6436559c2954d7f35b7fec29dfcbaa4ebdc03b</id>
<content type='text'>
* src/tail.c (main): Tailing a pipe "forever" is not useful,
and POSIX specifies that tail ignore the -f when there is no
file argument and stdin is a FIFO or pipe.  So we do that.
In addition, GNU tail excludes "-" arguments from the list of files
to tail forever, when the associated file descriptor is connected
to a FIFO or pipe.  Before this change, ":|tail -f" would hang.
Reported by Ren Yang and Ulrich Drepper.
* tests/tail-2/pipe-f: Test for this.
* tests/tail-2/pipe-f2: Ensure tail doesn't exit early for a fifo.
* tests/Makefile.am (TESTS): Add these tests.
* NEWS (POSIX conformance): Mention it.
</content>
</entry>
</feed>
