bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "tail -f" fails on named pipes


From: Jim Meyering
Subject: Re: "tail -f" fails on named pipes
Date: Mon, 16 Jun 2003 12:52:37 +0200

"Ian! D. Allen" <address@hidden> wrote:
> Re: GNU tail: tail (textutils) 2.0.17
>
> I wanted to use tail -f on several named pipes.  It doesn't work - it
> keeps reading from the first pipe it opens waiting for an EOF that
> will never happen.
>
> Looking at the code, I'm thinking the changes to make it work might
> not be difficult.  Any interest?

Yes!
Thanks for pointing that out.

If you really take this on, please use the latest sources,
which are available through CVS.  There have been many changes
since textutils-2.0.17.  Now the package is called the coreutils.
Instructions for getting the latest sources are below.

I've just tweaked this paragraph in the README file:

    --------------------------
    ...
    If you sent a complete patch and, after a couple weeks you haven't
    received any acknowledgement, please ping us.  A complete patch includes
    a well-written ChangeLog entry, unified (diff -u format) diffs relative
    to the most recent test release (or, better, relative to the latest
    sources in the CVS repository), an explanation for why the patch is
    necessary or useful, and if at all possible, enough information to
    reproduce whatever problem prompted it.  Plus, you'll earn lots of
    karma if you include a test case to exercise any bug(s) you fix.
    Instructions for checking out the latest source via CVS are here:

      http://savannah.gnu.org/cvs/?group=coreutils
    --------------------------

BTW, I just noticed that the current version of tail has a
problem in that it doesn't work with named pipes at all:

  $ mkfifo j
  $ ./tail -f j &
  [1] 29167
  $ echo foo > j
  $ foo
  ./tail: j: file truncated
  ./tail: j: cannot seek to offset 0: Illegal seek
  $ [1]+  Exit 1                  ./tail -f j

That is due at least in part to the fact that tail now fails
upon lseek failure.  BTW, that is marked (via a FIXME comment and/or
a note in the TODO file) as something that should be fixed.
Such a failure for an individual file shouldn't cause tail to
terminate processing of _all_ files.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]