Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^5: HPUX corruption of file handle after fork

by sgt (Deacon)
on Dec 10, 2007 at 22:50 UTC ( [id://656263]=note: print w/replies, xml ) Need Help??


in reply to Re^4: HPUX corruption of file handle after fork
in thread HPUX corruption of file handle after fork

There are lots of issues at hand.

At the Un*x/POSIX level exit() does lots of cleaning. To be on the safe side it is usually better to _exit() in the child. IO buffering can get in the way as exit() will usually flush the streams before closing them.

perl will usually show its un*x heritage (except in some places and/or platforms in recent years where it was considered better to "fix" that un*x behaviour). Recently while translating C code for a system(3) with time-out I needed low-level IO and POSIX::_exit() to be close to the old behaviour.

Even at the perl level don't forget that exit() does call END blocks ...

5.8.0 was very buggy, so it would be better to use another version. cheers hth --stephan

  • Comment on Re^5: HPUX corruption of file handle after fork

Replies are listed 'Best First'.
Re^6: HPUX corruption of file handle after fork
by Abe (Acolyte) on Jan 31, 2008 at 16:57 UTC
    Thanks sgt - sorry I didn't notice for a bit. I'd solved it and didn't check the thread again. I was a chicken and just stuck to STDIN, though I'd understood what had gone wrong. Regards, Abe

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-19 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found