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

RE: [MiNT] expanded /proc vs new /kern



> -----Original Message-----
> From: Konrad M. Kokoszkiewicz [mailto:draco@obta.uw.edu.pl]
> Sent: Tuesday, December 07, 1999 10:22 PM
> To: Guido Flohr
> Cc: MiNT List
> Subject: Re: [MiNT] expanded /proc vs new /kern
> 
> 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.

Jo Even Skarstein