Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 19:28:41 +0100
From:      Chris Rees <utisoft@googlemail.com>
To:        Kelly Jones <kelly.terry.jones@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Waiting for a process to die
Message-ID:  <b79ecaef0905311128v2e1921a8p30c6ead961759780@mail.gmail.com>
In-Reply-To: <26face530905311117te38a4faya92733fbfebd9597@mail.gmail.com>
References:  <26face530905311117te38a4faya92733fbfebd9597@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/5/31 Kelly Jones <kelly.terry.jones@gmail.com>:
> 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)
>
> I'm sure this is trivial, but I can't find a way to do it.
>
> I wrote a Perl script that checks every second if /proc/pid exists,
> but that only works if /proc is mounted + I'm now on VMs which can't
> easily mount /proc
>
> --
> We're just a Bunch Of Regular Guys, a collective group that's trying
> to understand and assimilate technology. We feel that resistance to
> new ideas and technology is unwise and ultimately futile.


[ `ps ax |grep pid | wc -l ` = 1 ] && (echo "done!" | Mail -s "PROC
DONE" kelly.terry.jones@gmail.com)

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in a mailing list?



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