Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^5: HPUX corruption of file handle after fork

by sgt (Deacon)
on Dec 10, 2007 at 22:50 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2023-03-24 18:57 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (61 votes). Check out past polls.