Date: Wed, 19 Dec 2007 17:15:11 -0800 From: Chuck Swiger <cswiger@mac.com> To: Mikhail Teterin <mi+mill@aldan.algebra.com> Cc: questions@freebsd.org Subject: Re: tail does not exit Message-ID: <96BFA267-0DFA-4DD7-A596-3DE30F04F2C0@mac.com> In-Reply-To: <200712191906.16254.mi%2Bmill@aldan.algebra.com> References: <200712192322.lBJNMfps053071@aldan.algebra.com> <86abo64543.fsf@bsd.by> <200712191906.16254.mi%2Bmill@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 19, 2007, at 4:06 PM, Mikhail Teterin wrote: > Josh Tolbert: >> Cause the -f option to tail doesn't work that way. -f always waits >> for more >> input. > > I know very well about -f waiting for more *input*. What puzzles me, > is that > tail does not quit, when its *output* is closed. > > James Harrison: >> Is there a reason you want the -f flag? > > Yes, I want awk to be processing the lines, which are appended to > the file, > until it finds, what it is looking for, and exits. I expect tail to > go away, > when its stdout is closed, but it does not. > >> tail -f holds on for dear life until a ctrl-c happens. IT HAS A DEATH >> GRIP! > > This seems like a bug to me... It should hold on to its input > file(s), but > exit peacefully, when its stdout closes. No? A quick test suggests that "tail -f" will close when it gets a SIGPIPE. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96BFA267-0DFA-4DD7-A596-3DE30F04F2C0>