tail -f stops working

David J. Sullivan sullivan at esquire.UUCP
Wed Jun 28 04:14:06 AEST 1989


I've noticed something that is quite vexing and a bit confusing:
tail -f's on files that don't change often can stop working.  In
essence, the code looks like:

        for (;;)
        {       sleep(1);
                while ((n = read (0, bin, BUFSIZ)) > 0)
                        (void)write (1, bin, n);
        }

In fact, any sort of read on something that might not have data for
quite a while -- sometimes as little as 15 minutes, but sometimes
longer -- can go into the big sleep and not wake up.

Bopping these programs with other signals can sometimes wake them up
(bringing them to the foreground, stopping them and then backgrounding
them again, for example).

FYI, this is at OSx 4.1-880930 on a 98x in the ucb universe.  I
haven't gotten 5.0 up yet, so I can't say if it's different.

Can anyone shed some light on this?  Is this a bug, or what?

Thanks!
David J. Sullivan

Davis Polk & Wardwell, 14 Wall Street, NYC 10005  212/266-0730
ARPA:  sullivan at acf4.nyu.edu
UUCP:  {uunet|cmcl2}!esquire!sullivan



More information about the Comp.sys.pyramid mailing list