summaryrefslogtreecommitdiff
path: root/src/tail.c
AgeCommit message (Collapse)Author
1999-11-22(recheck): Handle a race condition (including <dev,inode>Jim Meyering
reuse) that would lead to a failed assertion. Reported by Ken Pizzini. (tail_forever): Record errno before using it in call to `error' which might change it. (tail_file): Likewise.
1999-11-03Fix so that `tail -fn 2 file' works again.Jim Meyering
(anonymous enum) [LONG_FOLLOW_OPTION]: Define. (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'. (main): Remove the `::' after the `f' in getopt_long string. Add `case LONG_FOLLOW_OPTION' after `case 'f':'. Based on a patch from Tim Waugh.
1999-11-03(anonymous enum) [RETRY_OPTION]: Define.Jim Meyering
[MAX_UNCHANGED_STATS_OPTION]: Likewise. [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise. [PID_OPTION]: Likewise. (long_options): Use *_OPTION instead of CHAR_MAX + N. (main): Likewise.
1999-11-03(recheck): Don't refuse to tail a non-regular, non-pipe.Jim Meyering
(tail_file): Likewise.
1999-08-15(ENOSYS): Define to a bogus value if not already defined.Jim Meyering
(parse_options): Warn if --pid=PID is used and kill() returns ENOSYS (e.g. when compiled with DJGPP).
1999-08-06(Follow_mode): Remove comma at end of enumerator list.Jim Meyering
Reported by Kaveh Ghazi.
1999-08-03(tail_forever): When following by name and calling recheckJim Meyering
because of exceeding max_n_consecutive_size_changes_between_opens, `continue' so we don't fall through and (assuming the file finally grew) get the erroneous `file truncated' message.
1999-07-31(tail_forever): Don't call kill if pid is 0.Jim Meyering
Detect when `writer_is_dead' also when the writer is some other user. From Karl Heuer. (parse_options): Warn if --pid=PID is used without -f.
1999-07-30Include signal.h for kill prototype.Jim Meyering
1999-07-30New option: --pid=PID.Jim Meyering
(pid): New global. (long_options): Add `pid'. (usage): Describe it. (tail_forever): Implement it. (parse_options): Handle the new option and required arg. Suggestion and pseudo-code from Karl Heuer.
1999-07-26more commentsJim Meyering
1999-07-26add commentJim Meyering
1999-07-26(struct File_spec) [n_stat_calls]: Remove unused member.Jim Meyering
1999-07-11(recheck): Use assert instead of unnecessary close_fd.Jim Meyering
Remove a couple unnecessary FIXME comments.
1999-07-10(struct File_spec) [tailable]: Rename from `missing' andJim Meyering
document. Change all uses and locals like was_missing to was_tailable. Invert expressions as appropriate. (reopen_inaccessible_files): Rename from allow_missing. (sleep_interval): Describe. (--allow-missing): Deprecate. (--retry): New option, equivalent to --allow-missing. (usage): Document name vs. descriptor differences. Refer to manual for descriptions of --max-unchanged-stats=N and --max-consecutive-size-changes=N. (valid_file_spec): New function. (recheck): Assert valid_file_spec. Remove dead else-if block (suggestion from Eli Zaretskii). Adjust stmts that set f->tailable -- unlike for `missing', tailable doesn't depend on errno == ENOENT. (parse_options): Give a warning if --retry is used when not following by name.
1999-07-10(struct File_spec): New member, errnum.Jim Meyering
(recheck): Record the new value of errno in f->errnum. Don't output an error message unless the new value of errno differs from the old one. Output a message if previously-inaccessible file becomes accessible. (tail_forever): Always recheck files whose fd is negative. If the file cannot be fstat'ed, record the errno value in f[i].errnum. (tail_file): If the file cannot be open, record the errno value in f->errnum. If it can be opened, initialize f->errnum to zero. If it's a non-regular non-fifo file, initialize f->errnum to -1.
1999-04-24Include new "xstrtol.h", not "xstrtoul.h".Jim Meyering
1999-04-17(file_lines): Fix serious bug introduced with last changes.Jim Meyering
From Andreas Schwab.
1999-04-12(COPY_TO_EOF): Define.Jim Meyering
(dump_remainder): Add parameter, n_bytes, and rewrite to use it. Update callers. (file_lines): Rename parameter. (tail_bytes): Remove obsolete comment.
1999-04-11Fix the problem whereby `yes > k & tail -1 k' would infloop.Jim Meyering
(dump_remainder): Move this function to precede the new use in file_lines. (tail_lines): Don't call dump_remainder here. (file_lines): Call dump_remainder here instead.
1999-04-11(xwrite): Use STDOUT_FILENO instead of literal `1'.Jim Meyering
1999-04-04Standardize --help and --version processing.Jim Meyering
1999-04-03Use AUTHORS in place of string in parse_long_options call.Jim Meyering
1999-04-03Insert AUTHORS definition.Jim Meyering
1999-04-03Use PROGRAM_NAME in place of string in parse_long_options call.Jim Meyering
1999-04-03define PROGRAM_NAMEJim Meyering
1999-03-25(recheck): Factor out a block of duplicated code.Jim Meyering
Set f->size to 0 upon encountering a new file so we read it from the beginning rather than from then end of the first line or block. Otherwise, after a log rotation, tail would omit the first line or block of the new file. Reported by Ed Avis.
1999-03-12(dump_remainder): Don't fflush stdout here.Jim Meyering
(main) [if forever]: Make stdout unbuffered, instead.
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. Remove declarations of show_help and show_version. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-02-16update copyright datesJim Meyering
1999-01-14Don't prototype usage as static.Jim Meyering
1999-01-09s/max_n_consecutive_size_changes/max_n_consecutive_size_changes_between_opens/Jim Meyering
1999-01-09(parse_obsolescent_option): Interpret `number' as decimal.Jim Meyering
(parse_options): Likewise. Reported by Kamal Paul Nigam. New option: --max-unchanged-stats=N. New option: --max-n-consecutive-size-changes=N.
1999-01-02(parse_options): Use XARGMATCH in place of argmatch.Jim Meyering
1999-01-01(tail_lines, tail_bytes) [O_BINARY]: Use binary I/O when appropriate.Jim Meyering
1999-01-01(parse_options): Use XARGCASEMATCH in place of argmatch.Jim Meyering
1998-12-17New options for tail: --follow=name, --follow=descriptor, --allow-missingJim Meyering
(Follow_mode): New enum. (n_live_files): New function. (tail_forever): Avoid starvation with --follow=name and a continually-growing unlinked or renamed file.
1998-09-19update bug-reporting addressJim Meyering
1998-08-30Don't assume ASCII.Jim Meyering
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering
1998-06-29Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering
1998-04-26[struct File_spec] (pretty_name): Remove member.Jim Meyering
(pretty_name): New function.
1998-04-26Remove usage-like comments near beginning of file.Jim Meyering
1998-04-26(xwrite): New function -- converted from macro.Jim Meyering
1998-04-26(close_fd): New function -- converted from macro.Jim Meyering
[struct File_spec] (n_stat_calls): New member. [struct File_spec] (n_unchanged_stats): New member. (max_n_unchanged_stats): New global. Initialize new members.
1998-04-12Include safe-read.h instead of merely declaring safe_read.Jim Meyering
1998-03-22merge variables: forever_multiple and foreverJim Meyering
(recheck): New function. Begin to support --allow-missing option.
1998-03-21(tail_forever): plug gross fd leaksJim Meyering
Don't close stdin Don't print header unnecessarily if the first file to grow is the last one for which a header was printed.
1998-03-17*** empty log message ***Jim Meyering
1998-03-15(tail_file): Merge largely-duplicated blocks of code.Jim Meyering