Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2001 00:45:28 -0400
From:      Mike Barcroft <mike@FreeBSD.ORG>
To:        Brian Dean <bsd@bsdhome.com>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.bin/nohup nohup.c nohup.1
Message-ID:  <20010720004528.B57085@coffee.q9media.com>
In-Reply-To: <20010719235441.A92761@neutrino.bsdhome.com>; from bsd@bsdhome.com on Thu, Jul 19, 2001 at 11:54:41PM -0400
References:  <200107192125.f6JLPAE95986@freefall.freebsd.org> <20010719235441.A92761@neutrino.bsdhome.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 19, 2001 at 11:54:41PM -0400, Brian Dean wrote:
> On Thu, Jul 19, 2001 at 02:25:10PM -0700, Mike Barcroft wrote:
> > 
> > mike        2001/07/19 14:25:10 PDT
> > 
> >   Modified files:
> >     usr.bin/nohup        nohup.c nohup.1 
> >   Log:
> 
> [...]
> 
> >     - Actually append to nohup.out (as documented and required
> >       by standard) instead of clobbering it.
> 
> I'm confused by this comment ... I use nohup all the time and have
> never had it clobber the output file.  Can you clarify this a little?

nohup(1) used to open(2) the file then lseek(2) to the end of the
file, instead of just opening with O_APPEND.  So two version running
at the same time clobber each other.  Try this with the old version:
/usr/bin/nohup du /var & /usr/bin/nohup du /usr
you'll find only one of them will be outputted.  With this version
the two may end up being intertwined, but no output is lost.

Best regards,
Mike Barcroft

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010720004528.B57085>