summaryrefslogtreecommitdiff
path: root/src/tail.c
AgeCommit message (Collapse)Author
2001-09-12tail: accept new option: -F, equivalent to `--follow=name --retry',Jim Meyering
for compatibility with FreeBSD and NetBSD versions of tail. (usage): Describe new option. (parse_options): Accept it.
2001-07-08(usage): Reformat so help2man generates a properly indented man page.Jim Meyering
2001-05-20(parse_obsolescent_option): Accept a b suffix.Jim Meyering
2001-05-15(parse_obsolescent_option): Use t_count_lines, notJim Meyering
count_lines, in error message.
2001-03-18(usage): Warn that the +N form will be withdrawn.Jim Meyering
2001-01-08whoops. move printf args, tooJim Meyering
2001-01-07Split a string that was longer than 2048 bytes.Jim Meyering
2000-12-03remove instrumentationJim Meyering
2000-12-03add instrumentation to detect some UMRsJim Meyering
2000-12-03(tail_file): Initialize ignore, dev, and ino members,Jim Meyering
when tailing forever and the open failed. Otherwise, we could get uninitialized memory references of those fields in recheck.
2000-12-03(OFF_T_MIN): Remove definition.Jim Meyering
(OFF_T_MAX): Likewise.
2000-12-03(parse_options): Use xstrtoumax to parse the byte and lineJim Meyering
offset. Give a better diagnostic when the requested offset is still representable but larger than OFF_T_MAX.
2000-08-06We know nbytes is 0, so remove it from bail-out test.Jim Meyering
2000-08-06(pipe_lines): Declare local `cp' to be const.Jim Meyering
2000-08-06(pipe_lines): Add variable `nbytes' so we can freeJim Meyering
`tmp' immediately after read loop. Don't process an empty file. This fixes a buffer-underrun error -- also thanks to bounded pointers.
2000-06-29(enum): Remove comma from end of enumerator list.Jim Meyering
From Gerhard Poul <gpoul@gnu.org
2000-05-27Arrange to call close_stdout upon exit.Jim Meyering
Don't close stdout explicitly. (usage): Add missing backslash at end of line. (write_header): Remove now-unused COMMENT parameter. Update all callers.
2000-04-17Don't remove support for --max-consecutive-size-changes just yet...Jim Meyering
2000-04-16Remove option: --max-consecutive-size-changes=N.Jim Meyering
Doesn't seem useful. (usage): Remove description.
2000-04-14tweak copyright dateJim Meyering
2000-04-12(usage): Tweak --help output. Suggestions from Karl Berry.Jim Meyering
2000-04-09(usage): Clarify descriptions of the --max-* options.Jim Meyering
From Karl Berry.
2000-03-04Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,Jim Meyering
marke it as such and ignore it forever after. (struct File_spec): New member. (recheck): Initialize new member. (tail_file): Likewise. (tail_forever): Skip the file if it's marked as ignorable.
2000-03-04Don't get failed assertion for `tail -f directory'.Jim Meyering
Revert most of 1999-10-20 change. Instead, ... (IS_TAILABLE_FILE_TYPE): Define to produce similar result. (recheck): Use it here. (tail_file): Use it here.
1999-12-05(main): Flush stdout before switching to unbuffered modeJim Meyering
and calling tail_forever. Required only on Solaris2.7 -- on other systems, using setvbuf to switch to unbufferd mode does the flush.
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