Unix (flavours; don't know what Windows does): Additionally, you might want to catch or ignore the SIGCHLD-signal that the parent process receives when the child process dies. If there is only one child process, a
$SIG{CHLD} = sub { wait(); }; as described in
perlipc can be used as a starter. This should protect the parent process in case the child process dies while the parent process has not yet reached
wait() (race situation).
Update: Well, after some testing, this seems to be an issue with older versions of perl and OS. The default SIGCHLD-handler of Perl 5.8.8 (Linux) works fine. Anyway, the SIG-handler might be useful if you are interested in an asynchronous notification of a child's decease.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.