I'm trying to write a program that will fork a number of children processes that will run concurrently and exit after some randomized amount of time. My problem is that I need the parent to spit out a message each time a child exits as follows:
"Daughter PID EXITED after (t) seconds."
with actual values for PID and (t). How would I make the parent detect when an exit has occurred and then display the message?