Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: system and &>/dev/null

by Fletch (Chancellor)
on Oct 10, 2008 at 18:34 UTC ( #716503=note: print w/ replies, xml ) Need Help??


in reply to Re^4: system and &>/dev/null
in thread system and &>/dev/null

That's the idiom I've always seen used (seek then truncate), which is why I recommended it back in my post.

Consulting APUE (well, technically the 1st edition of the same tome; pp 91-92), the discussion there indicates that while SVR4's truncate(2) could be used to extend a file (creating a hole) the 4.3+BSD version wouldn't extend the size of the file. So while seeking then calling truncate is possibly more effort than strictly necessary, it's probably more likely to work regardless of the underlying OS' truncate(2) semantics.

The cake is a lie.
The cake is a lie.
The cake is a lie.


Comment on Re^5: system and &>/dev/null
Replies are listed 'Best First'.
Re^6: system and &>/dev/null
by repellent (Priest) on Oct 10, 2008 at 21:28 UTC
    Very interesting. Thanks for the explanation!

    Yes, I would also opt for the option of minimal effort for more robustness.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-07-28 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls