FreeBSD Bugzilla – Attachment 161859 Details for
Bug 203662
tail -F <file> misbehaves with stdin closed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
tail: Don't assume fd 0 is standard input, because it might not be. Use the `stdin`FILE pointer instead.
tail.freebsd.patch (text/plain), 869 bytes, created by
Timo Buhrmester
on 2015-10-09 18:35:33 UTC
(
hide
)
Description:
tail: Don't assume fd 0 is standard input, because it might not be. Use the `stdin`FILE pointer instead.
Filename:
MIME Type:
Creator:
Timo Buhrmester
Created:
2015-10-09 18:35:33 UTC
Size:
869 bytes
patch
obsolete
>--- usr.bin/tail/forward.c.orig 2015-10-09 20:25:57.000000000 +0200 >+++ usr.bin/tail/forward.c 2015-10-09 20:26:31.000000000 +0200 >@@ -282,7 +282,7 @@ > return; > } > >- if (Fflag && fileno(file->fp) != STDIN_FILENO) { >+ if (Fflag && file->fp != stdin) { > EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE, > EV_ADD | EV_ENABLE | EV_CLEAR, > NOTE_DELETE | NOTE_RENAME, 0, 0); >@@ -322,7 +322,7 @@ > if (no_files > 1 && !qflag) > printfn(file->file_name, 1); > forward(file->fp, file->file_name, style, off, &file->st); >- if (Fflag && fileno(file->fp) != STDIN_FILENO) >+ if (Fflag && file->fp != stdin) > n++; > } > } >@@ -355,7 +355,7 @@ > ev_change++; > continue; > } >- if (fileno(file->fp) == STDIN_FILENO) >+ if (file->fp == stdin) > continue; > if (stat(file->file_name, &sb2) == -1) { > if (errno != ENOENT)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203662
: 161859