[patch] add pwait utility

Doug Barton dougb at FreeBSD.org
Sat Nov 7 20:27:39 UTC 2009


Jilles Tjoelker wrote:
> On Sat, Nov 07, 2009 at 03:01:36PM +0200, Kostik Belousov wrote:
>> On Sat, Nov 07, 2009 at 11:28:32AM +0100, Gary Jennejohn wrote:
>>> On Fri, 6 Nov 2009 23:24:46 +0100
>>> Jilles Tjoelker <jilles at stack.nl> wrote:
> 
>>>> I propose adding a small new utility to /usr/bin: pwait. Similar to the
>>>> Solaris utility of the same name, it waits for any process to terminate.
> 
>>> Why not /bin so it can be used before /usr is mounted?

I agree. It's such a tiny thing there's no reason not to put it in
/bin, and the potential benefits (being able to use it when /usr is
not present) far outweigh the costs.

>> And it seems to make sense to add this functionality to pkill/pgrep
>> binary, creating another hardlink to it.
> 
> Hmm, pwait's syntax is incompatible: it takes pids (pkill says: use
> kill) and the -v option does something totally different.

I agree with Jilles, I don't see any reason to complicate this. If
there is some reason that pkill/pgrep would need the functionality
internally then the pwait stuff could be turned into a library, but I
don't think that's what Kostik was proposing.

When you get this committed (in whatever form) send a note to
freebsd-rc at freebsd.org so that we can look at re-implementing
wait_for_pids with this. I think this is a very nice addition, thanks
for taking it on.


Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/



More information about the freebsd-hackers mailing list