Re: leading null characters produced in script...
- From: Robert Nichols <SEE_SIGNATURE@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 00:16:38 +0000 (UTC)
In article <1162196467.874765.323380@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Avalon1178 <Avalon1178@xxxxxxx> wrote:
:
:I think I understand what you're saying. There is only one
:complication: The "otherScript" that I mentioned is considered a
:script that I have no control over (Sure, since it is also a script I
:can modify it...but preferably not, since this is considered, well, for
:lack of a better word, "third-party" script). All it does is it does
:some processing, and it prints processing info to stdout. The only way
:to capture these is by redirection, hence "./otherScript >$logfile".
Easy fix. Change your redirection to _append_ to the log file:
./otherScript >>$logfile
When a file is opened in append mode, there is an implied seek to EOF
before every write(2) call. Now, when your log rotation truncates the
file to zero length, the next write will seek to offset 0 instead of
continuing at its current (large) offset.
--
Bob Nichols AT comcast.net I am "RNichols42"
.
- Follow-Ups:
- Re: leading null characters produced in script...
- From: Avalon1178
- Re: leading null characters produced in script...
- References:
- leading null characters produced in script...
- From: Avalon1178
- Re: leading null characters produced in script...
- From: Chris F.A. Johnson
- Re: leading null characters produced in script...
- From: Avalon1178
- leading null characters produced in script...
- Prev by Date: Starting with Debian - update
- Next by Date: Re: best almost-KDE window manager?
- Previous by thread: Re: leading null characters produced in script...
- Next by thread: Re: leading null characters produced in script...
- Index(es):
Relevant Pages
|