[aklug] Re: mindbender

From: <bryanm@acsalaska.net>
Date: Thu Mar 24 2011 - 19:33:08 AKDT

On Thu, March 24, 2011 9:26 am, Shane R. Spencer wrote:
> On 03/24/2011 04:03 AM, bryanm@acsalaska.net wrote:
>> Consider this command:
>>
>> $ killall killall
>>
>> In order to complete successfully, the process would have to
>> prematurely terminate itself; which, of course, means that it
>> would not complete successfully.
>>
>> It's a unix paradox!
>
> killall
> -> Store list of all processes that aren't mine
> -> Check their pattern
> -> Match -> Kill
>
> from killall.c
>
> ...
> self = getpid ();
> ...
> if (!(pid = (pid_t) atoi (de->d_name)) || pid == self)
> continue;
> ...
>
> I think the developer was aware of complete uselessness of process suicide.

How disappointingly practical. But still, suppose one were to
remove that bit of code and run the altered killall. What then?

--
Bryan Medsker
bryanm@acsalaska.net
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Mar 24 19:33:16 2011

This archive was generated by hypermail 2.1.8 : Thu Mar 24 2011 - 19:33:16 AKDT