in reply to what is this doing? - while (wait() != -1)

wait evaluates to the pid of a child as it exits, effectively sleeping till then. If there are no children, wait returns -1, so the while loop is testing whether any more remain.

Is this code in a sub which is called again after a child error is handled?

After Compline,
Zaxo

  • Comment on Re: what is this doing? - while (wait() != -1)