Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: capturing syswrite failures

by bluto (Curate)
on Mar 01, 2007 at 19:48 UTC ( #602765=note: print w/ replies, xml ) Need Help??

in reply to Re: capturing syswrite failures
in thread capturing syswrite failures

print makes sense if you turn off buffering -- which is pretty close to the same as using syswrite. If buffering is involved, print makes it very hard to recover and continue after an error since the error can be deferred. You also need to remember to do an explicit close and check the error on that.

For example, if NFS returns ESTALE (e.g. after a server reboot), you may have to close and reopen the file before the NFS server will allow you to write. That close is going to try, and fail, to send the buffered data. Figuring out what data to resend in this case is easy with syswrite (e.g. close, open, syswrite the buffer again).

Comment on Re^2: capturing syswrite failures

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-05-29 06:57 GMT
Find Nodes?
    Voting Booth?