[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux,
From: |
Jim Meyering |
Subject: |
Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1) |
Date: |
Mon, 13 Dec 2004 10:34:10 +0100 |
Roberto Nibali <address@hidden> wrote:
...
>> Oh. I see that this has been fixed since 5.2.1.
...
> Hmmm, has it really? Could you show me the changeset, please?
My use of `since' was misleading.
This was fixed *after* coreutils-5.2.1.
>> You can find the development version here:
>> http://savannah.gnu.org/cvs/?group=coreutils
Here's one of the related ChangeLog entries:
2004-07-23 Paul Eggert <address@hidden>
Fix bug with "tail -f" reported by Rob Holland in
<http://lists.gnu.org/archive/html/bug-coreutils/2004-07/msg00054.html>.
Also, remove the undocumented and unsupported-since-2000
--max-consecutive-size-changes options. Fix another related bug:
"tail" got confused if stdin, stdout, or stderr were closed.
Also, use output buffering even with "tail -f".
* NEWS: Document this, plus yesterday's patch.
* doc/coreutils.texi (tail invocation): "size has remained the same"
-> "file has not changed", which is more accurate for fifos.
* src/tail.c: Include fcntl-safer.h.
(COPY_TO_EOF): Set to UINTMAX_MAX, not OFF_T_MAX (which was wrong).
(COPY_A_BUFFER): New macro.
(struct File_spec): New members mtime, mode, blocking.
Remove member n_consecutive_size_changes.
(DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES,
max_n_consecutive_size_changes_between_opens,
MAX_CONSECUTIVE_SIZE_CHANGES_OPTION): Remove.
(long_options, tail_forever, parse_options):
Remove (non-)support for --max-consecutive-size-changes.
(record_open_fd): New function.
(recheck, tail_file): Use it. Don't assume that stdin is open.
(dump_remainder): Add support for new COPY_A_BUFFER special value.
Treat errno==EAGAIN like EOF, since it might be a nonblocking read.
(recheck): New arg BLOCKING, specifying whether to use blocking reads.
All uses changed.
(n_live_files): Remove, replacing with...
(any_live_files): New function. All uses changed.
(tail_forever): Use nonblocking I/O unless we know that blocking I/O
is safe; this avoids some hangs when reading from a fifo.
Avoid invoking fstat or sleep when using blocking I/O.
Do not check for changes to size if the file is not a regular file,
as the size is undefined in that case.
Check for changes to mtime or mode, too; this works for non-regular
files.
(tail_forever, main): Redo fflush strategy to work even when input
is nonblocking. Don't use unbuffered output; just flush when needed.
- tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1), Roberto Nibali, 2004/12/03
- Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1), Paul Eggert, 2004/12/04
- Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1), Roberto Nibali, 2004/12/10
- Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1), Jim Meyering, 2004/12/10
- Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1), Roberto Nibali, 2004/12/13
- Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1),
Jim Meyering <=