diff options
| author | Eivind Eklund <eivind@FreeBSD.org> | 2005-05-26 22:14:37 +0000 |
|---|---|---|
| committer | Eivind Eklund <eivind@FreeBSD.org> | 2005-05-26 22:14:37 +0000 |
| commit | d21ccc03c0852e552d7f2f5282c41e54ae1d69ac (patch) | |
| tree | 20e2a2dd41e5598da88f1e9f1fca9b7f12e9e196 /usr.bin | |
| parent | 42af4f50999fb1dd3eb8e988c7d6d07c65b0eb3d (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/tail/tail.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 9162d1712ba7..373e6e2c2a54 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -219,12 +219,7 @@ main(int argc, char *argv[]) exit(1); } - /* - * Determine if input is a pipe. 4.4BSD will set the SOCKET - * bit in the st_mode field for pipes. Fix this then. - */ - if (lseek(fileno(stdin), (off_t)0, SEEK_CUR) == -1 && - errno == ESPIPE) { + if ((sb.st_mode & S_IFMT) == S_IFSOCK || (sb.st_mode & S_IFMT) == S_IFIFO) { errno = 0; fflag = 0; /* POSIX.2 requires this. */ } |
