Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 21:40:13 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Kelly Jones <kelly.terry.jones@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Waiting for a process to die
Message-ID:  <alpine.BSF.2.00.0905312138240.25771@wojtek.tensor.gdynia.pl>
In-Reply-To: <26face530905311117te38a4faya92733fbfebd9597@mail.gmail.com>
References:  <26face530905311117te38a4faya92733fbfebd9597@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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@gmail.com)

if i understand you correctly:

your_program parameters &
bg_process_number=$!

...something else...

wait $bg_process_number
echo "done!"






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0905312138240.25771>