Waiting for a process to die

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Sun May 31 19:40:23 UTC 2009

> How do I wait for a specific process to die? I want to do something like:
> waitpid 1234&&(echo "done!" | Mail -s "PROC DONE" kelly.terry.jones at gmail.com)

if i understand you correctly:

your_program parameters &

...something else...

wait $bg_process_number
echo "done!"

More information about the freebsd-questions mailing list