History log of /freebsd-9.3-release/usr.bin/tail/read.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 193488 05-Jun-2009 brian

Change the behaviour of -F slightly; it now persists (forever) in
trying to open files rather than giving up when it encounters an
error. ENOENT errors are not reported.

As a result, files that are moved away then recreated are not at
risk of being 'lost' to tail. Files that are recreated and
temporarily have unreadable permissions will be shown when they
are fixed.

This behaviour is consistent with the GNU version of tail but
without the verbiage that goes with the GNU version.

This change also fixes error messages accompanying -f and -F.
They no longer report problems with (null)!

MFC after: 3 weeks


# 173838 21-Nov-2007 avatar

Nuking the temporary pointer once it is properly tracked in local storage.
This should fix the double free() bug where there's no tailing newline(\n)
character:

current# echo -n test | tail
testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function
arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448.
Abort (core dumped)

Reviewed by: kib
MFC after: 3 days


# 173285 02-Nov-2007 charnier

initialize variables, WARNS=6 compliant


# 172719 17-Oct-2007 kib

Fix various memory leaks.

Submitted by: rdivacky
Obtained from: OpenBSD
MFC after: 1 week


# 137157 03-Nov-2004 paul

Convert to ANSI style function definitions.


# 116156 10-Jun-2003 markm

Revert part of the last commit. This fixes tail for pipes.

Submitted by: joerg


# 87712 11-Dec-2001 markm

WARNS=2 fixes, use __FBSDID().


# 69552 03-Dec-2000 asmodai

Remove register keyword usage with prejudice.
Modern compilers are smarter when it comes to allocating register
usage.


# 69528 02-Dec-2000 asmodai

Properly constify some static arrays.

Also #if out some sccsid's and add rcsid's.


# 17826 25-Aug-1996 peter

Dont forget to #include <err.h>


# 17825 25-Aug-1996 peter

Argh! caught! *blush*.. This program was supplying it's own 'err' routine
which was slightly different to the libc one. To save any more cunfusion,
use the libc one.


# 17341 30-Jul-1996 adam

one file somehow slipped by me in the previous commit
tidy up


# 17339 30-Jul-1996 adam

when file can be opened for read but cannot be read from:
fail once (was twice) in forward case
fail once (was no times) in reverse case

this can happen when file is a directory on an NFS or procfs mount.


# 11411 10-Oct-1995 phk

Another program depending on zero'ed malloc.

Submitted by: Kai Vorma <vode@snakemail.hut.fi>


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources