[patch] add pwait utility

Gabor Kovesdan gabor at FreeBSD.org
Sat Nov 7 21:17:15 UTC 2009


Jilles Tjoelker escribió:
>> 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.
>   
That's not an issue. You can declare

extern char *__progname;

and use it to parse the command line arguments in a different way. Of 
course, it only makes sense if pkill/pgrep has some inner functionality 
you can make use of to avoid duplication.

-- 
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: gabor at FreeBSD.org .:|:. gabor at kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org



More information about the freebsd-hackers mailing list