Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Jos Backus
On Wed, Nov 16, 2005 at 11:03:00AM +, Pawel Jakub Dawidek wrote: [snip] > - Exit with 2 on usage errors as documented. Just curious as to why we are not using EX_USAGE (from ) here. Or doesn't pkill qualify as a `system program'? -- Jos Backus jos at catnook.com ___

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Andrey Chernov
On Wed, Nov 16, 2005 at 03:06:35PM +0100, [EMAIL PROTECTED] wrote: > The process didn't receive the signal, it died for itself. The new > behaviour is identical to whether it died before the list was build. > Warning about it or stopping with error just makes the two cases > asymmetrical. Ok, I ag

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Pawel Jakub Dawidek
On Wed, Nov 16, 2005 at 03:41:43PM +0300, Andrey Chernov wrote: +> On Wed, Nov 16, 2005 at 12:59:00PM +0100, Pawel Jakub Dawidek wrote: +> > Let's say you call 'pkill sleep'. First it creates list of the matching +> > processes and when the list is done, it starts killing processes from +> > the li

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread joerg
On Wed, Nov 16, 2005 at 03:41:43PM +0300, Andrey Chernov wrote: > > 1) For SIGKILL, pkill should ignore disappeared precesses, as NetBSD does. > 2) For any other signal, it should issue _warning_ and not error & stop. The process didn't receive the signal, it died for itself. The new behaviour is

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Andrey Chernov
On Wed, Nov 16, 2005 at 03:41:43PM +0300, Andrey Chernov wrote: > 1) For SIGKILL, pkill should ignore disappeared precesses, as NetBSD does. > 2) For any other signal, it should issue _warning_ and not error & stop. Because SIGKILL can't be trapped and even not do any special action like SIGILL (

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Andrey Chernov
On Wed, Nov 16, 2005 at 12:59:00PM +0100, Pawel Jakub Dawidek wrote: > Let's say you call 'pkill sleep'. First it creates list of the matching > processes and when the list is done, it starts killing processes from > the list. When there is a race, so that process was inserted into the > list, but

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Pawel Jakub Dawidek
On Wed, Nov 16, 2005 at 02:24:19PM +0300, Andrey Chernov wrote: +> On Wed, Nov 16, 2005 at 11:03:00AM +, Pawel Jakub Dawidek wrote: +> > - If a process dissappears while we are signalling it, don't count it as a +> > match/error. +> +> I don't understand "match" part here, but can say s

Re: cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Andrey Chernov
On Wed, Nov 16, 2005 at 11:03:00AM +, Pawel Jakub Dawidek wrote: > - If a process dissappears while we are signalling it, don't count it as a > match/error. I don't understand "match" part here, but can say something about "error" part: while it looks reasonable, it is wrong direction m

cvs commit: src/usr.bin/pkill pkill.c

2005-11-16 Thread Pawel Jakub Dawidek
pjd 2005-11-16 11:03:00 UTC FreeBSD src repository Modified files: usr.bin/pkillpkill.c Log: Sync as close as possible with NetBSD. This includes fixes and cleanups listed below: - If a process dissappears while we are signalling it, don't count it as a mat