delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/30/10:18:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <3729BC6D.277F9A0@bgs.com>
Date: Fri, 30 Apr 1999 10:21:33 -0400
From: Eugene Kanter <eugene AT bgs DOT com>
X-Mailer: Mozilla 4.51 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: tail -f <file name> locks <file name>
References: <Pine DOT SUN DOT 3 DOT 93 DOT 990427155056 DOT 22463B-100000 AT modi DOT xraylith DOT wisc DOT edu>

Mumit Khan wrote:
> 
> On Tue, 27 Apr 1999 thomas AT on DOT com wrote:
> 
> > This has not been the original intention of 'tail -f': This command should
> > enable the user
> > to watch the contents of a file grow. If this file is locked by the tail
> > command, the writing process
> > will run on error.
> >
> 
> I'm not sure why you're seeing a problem, but I do the following all the
> time:
> 
>   $ make > make.log 2>&1 &
>   $ tail -f make.log
> 
> And in some cases, the ``tail -f make.log'' is already running in a
> different window when I issue the ``make'' command.
> 
> Is the writer explicitly locking the output file? Could you show an
> example of the failure?

Here is an example:

bash window 1:                     bash window 2:
bash-2.02$ touch  mappfile.out
bash-2.02$ tail -f  mappfile.out   bash $ cat > mappfile.out
line1                              line1
line2                              line2
                                   ^C
                                   bash $ rm mappfile.out
                                   bash $ ls mappfile.out
                                   ls: mappfile.out: No such file or
directory
                                   bash $ cat > mappfile.out
                                   bash: mappfile.out: Permission denied

Is this enough for you to reproduce it?

Thanks,

Eugene.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019