summaryrefslogtreecommitdiff
path: root/usr.bin/tail
AgeCommit message (Collapse)Author
2021-12-23fix indent to make it clear a line isn't part of previous ifJonathan Gray
ok deraadt@ millert@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-01-04Don't reopen file if its stdin.Martijn van Duren
From leo_tck at volny dot cz OK millert@
2017-03-26Change a reallocarray+bzero into recallocarray.Martijn van Duren
OK tb@ and deraadt@
2017-02-01Add a missing sizeof(*lines) factor to previous commit to ensure we zeroTheo Buehler
out enough of the lines array. Problem found with malloc's 'J' option. ok martijn
2017-02-01Don't allocate the buffer for the -n flag in one call.Martijn van Duren
Fixes an ENOMEM with an extremely large -n value and a small input. Issue reported by Soner Tari OK stsp@
2016-07-05Modify code added in rev 1.30 to use the correct variable instead of aJonathan Gray
different uninitialised one. ok martijn@
2016-02-03fix off-by-one in argument parsingAlexander Hall
ok martijn@
2016-01-25Fix a crash as found by sthen@martijn
tested and OK sthen@ OK with minor tweak schwarze@
2015-11-21better fixes for running tail without -f. from Martijn van DurenTed Unangst
2015-11-20quick hack to fix "tail +n", reported broken by Mikolaj Kucharski.Ted Unangst
this doesn't attempt to repair all cases, but restoring basic functionality is a first step.
2015-11-19another try to allow tailing multiple files. maybe it works?Ted Unangst
commit now to allow people to test. from Martijn van Duren
2015-10-25Unify & improve paragraphs talking about "==> file <==" headers inVadim Zhukov
head(1) and tail(1). Input & okay from jmc@
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-07tame "stdio rpath" for when paths are specified; otherwise tame "stdio"Theo de Raadt
for the stdin case. ok doug
2015-09-15avoid the useless idiom Fl Ns Ar, use Fl ArIngo Schwarze
2015-07-22Fix memory leak when tail -r is used with anything but regular files.Tobias Stoeckmann
ok schwarze@
2015-03-26Whitespace fix: Closing bracket belongs to if-block, not enclosing forTobias Stoeckmann
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-06SIZE_MAX is standard, we should be using it in preference to theTodd C. Miller
obsolete SIZE_T_MAX. OK miod@ beck@
2014-06-03Actually, we've handled FIFOs on stdin in accordance with POSIX since 1996.Philip Guenther
query and ok jmc@
2014-05-31tweak previous;Jason McIntyre
2010-09-03add an EXIT STATUS section for /usr/bin;Jason McIntyre
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2008-11-13Backout previous commit, there are still some issues with it.Landry Breuil
ok sthen@
2008-10-17Permit tail -f to follow multiple files, useful when you want to monitorLandry Breuil
several logfiles in a single terminal. split forward() and move the corresponding -rewritten- code to follow(). Closes PR 5092. ok millert@ gilles@ sobrado@
2008-06-02fix double free which can happen if the last line has no newline;Otto Moerbeek
from Matthew Dempsky; ok ray@ millert@
2007-10-31sync usage() w/ synopsis; from Pierre RiteauJason McIntyre
ok sobrado
2007-10-22use EV_SET() instead of doing it by hand; Iruata SouzaTheo de Raadt
2007-09-29unneeded includes and whitespace police; from Igor ZinovikOtto Moerbeek
2007-09-16Another mem leak plugged. With help from Igor Zinovi. ok millert@Otto Moerbeek
2007-09-13Plug mem leak. From Igor Zinovik; ok millert@Otto Moerbeek
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-30- use a consistent text for STANDARDSJason McIntyre
- note which options are extensions to POSIX
2006-12-28- less macros needed in SYNOPSISJason McIntyre
- sort options
2006-10-02- simplify a list itemJason McIntyre
- use .Ex
2006-10-02reword a clunky sentence;Jason McIntyre
2006-03-24ANSIfy. Ok ray@Kjell Wooding
2006-03-22Clean up some lint and -Wall.Kjell Wooding
Changed many signed types ->size_t for consistency. Also, fix some realloc usage. Original from <jasonrcrawford at gmail.com> (ok ray@) Additions and additional cleanup to fix some off_t -> size_t issue by me. "looks good" otto@
2004-03-12If kqueue is not available, revert back to old behavior. Unbreaks tail -fOtto Moerbeek
on NFS and other filesystems not supporting kqueues. ok tedu@ millert@
2004-03-01Unbreak file truncation handling. Resolves PR 3689.Otto Moerbeek
ok tdeval@ millert@
2004-02-16make -b and -c work with large offsets; tweak from millert@Otto Moerbeek
ok henning@ itojun@ millert@
2003-07-14typo in comment. ok henning@Otto Moerbeek
2003-07-01rewrite to not use mmap(2). solves a bunch of issues:Henning Brauer
- No more I/O related SEGVs (PR 2337?). - Performance linear to size of output, not input file size, even for very large files. Same for -r. - Reverse tail also works for very large files. - Very large values of n possible, even for very large files. Same for -r. work by Otto Moerbeek <otto@drijf.net> tested by and ok millert@ and myself
2003-06-10mostly ansi cleanup; pval okTheo de Raadt
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-08strlcpy conversion, increase buffer size by one char. ok millert@Daniel Hartmeier
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-19kill more registersMike Pechkin
millert@ ok