This does not wait for all children to finish. It processes multiple children from the same SIG CHLD signal if they are "ready". If the parent "dies", then you as a child eventually get this CHLD signal and you get removed from the process table. This is a non-blocking situation, that's what WNOHANG does - it doesn't "hang up" waiting for anybody. If say 3 of 20 children have CHLD signal at the same time, then you have to process those 3 children at once. After that, then the other 17 is a different story. So no, this will not "hang" and wait for all children to finish. This just says, "hey at least one and maybe more than one children" are in CHLD signal state". "At least one" does not mean "all", and it doesn't mean wait for all children to be in CHLD signal state!
Ok, then if you are launching servers that spawn other child processes, then you should keep track of the PID's or names of those things. If you have permission level that allows you to kill that server, then its children will also be killed if you have right signal handling installed.
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.