in reply to how to do things while waiting?

Look up waitpid. Alternately you might want to try:
$SIG{CHLD} = 'IGNORE';
and not worry about your kids. (On most Unix platforms I believe this will cause them to be auto-reaped without using Perl's unreliable signals.)

Replies are listed 'Best First'.
(tye)Re: how to do things while waiting?
by tye (Sage) on May 17, 2001 at 02:36 UTC

    No, that only works on SVR4-based versions of Unix and not on BSD-based versions of Unix. (Now that Sun has converted to SVR4-based, you might be able to argue "most" is appropriate, but I won't.)

            - tye (but my friends call me "Tye")
      Quoting from perlipc for version 5.005_03:
      On most UNIX platforms, the CHLD (sometimes also known as CLD) signal has special behavior with respect to a value of 'IGNORE'. Setting $SIG{CHLD} to 'IGNORE' on such a platform has the effect of not creating zombie processes when the parent process fails to wait() on its child processes (i.e. child processes are automatically reaped). Calling wait() with $SIG{CHLD} set to 'IGNORE' usually returns -1 on such platforms.
      So if you don't like my wording, you should check whether it is still needed and then send in a documentation patch.