[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] /proc filename restrictions (Re: expanded /proc vs new /kern)



On Wed, Dec 08, 1999 at 10:22:35AM +0100, Jo-Even.Skarstein@gjensidige.no wrote:
>> Processes opening /proc entries in the documented way will 
>> match any long
>> name as long as it matches the mask "u:\proc\.%03d",pid. So this is a
>> NULL+3 filesystem rather than an 8+3 one.
>
>The problem isn't opening a process based on it's pid (then you don't need
>to parse the filename at all, just open ".[pid]"), but to open it based on
>it's name. Since /proc has always been 8+3, all programs written with long
>filenames in mind has taken this into consideration.
>
>Btw. using PLOADINFO seems to be the best and most portable way of dealing
>with this (since it will always return the true filename regardless of any
>limitations in /proc), but if this should be *really* useful then anyone
>must the allowed to open any file in /proc for reading.


Perhaps a stupid question, but: What happens after the 999th process has
been started? Does the pid switch back to 000 or does the system simply
crash?

 Thothy