Re: PID==0 problems

From: Andy Valencia <vandys_at_nospam.org>
Date: Thu Oct 30 1997 - 07:32:25 PST

[Pavel Machek <pavel@atrey.karlin.mff.cuni.cz> writes:]

>At least under vsta 1.5.2, 0 is perfectly valid PID. There's trouble
>with this pid, however - with notify, it means 'send notification to
>itself'. As a result, process with pid==0 is unkillable. (In my case
>it was console driver). I removed this concrete problem by setting
>static variable 'last_pid' to 1, but in case PID's can wrap (can
>they?) this is not a solution.

I guess in almost all cases, not killing your console is a feature. :-)
Since 0 is a magic value, I believe you're right; we should start carving
PID's at 1. I believe on wrap the scan starts above 0 (200, if memory
serves), so that case is already covered. Note that the number of free
PID's, which now starts at 2^32-1, must now be set to 2^32-2.

                                                        Andy
Received on Thu Oct 30 05:34:02 1997

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:43 PDT