Alexander Bluhm wrote:
> On Tue, May 03, 2016 at 12:20:34AM -0400, Ted Unangst wrote:
> > Alexander Bluhm wrote:
> > > 
> > > Can we have the same logic for KERN_FILE_BYPID and KERN_FILE_BYUID?
> > 
> > I think this should be BYPID only. I'm not sure why. Maybe because a user
> > exists even when the user isn't running any processes. But a process doesn't
> > exist when it doesn't exist.
> 
> When "fstat -p $pid" behaves like grep for a process, why should
> "fstat -u $uid" not grep for a user?  And checking wether a user
> runs processes seems useful.

hmm. fstat pid is like "ls somefile". If the file is missing, it's an error.

But fstat uid is like "ls directory". Even if the directory is emtpy, the
command succeeds.

That's how I think of it, but it probably doesn't matter. If you're not
convinced I'm right, go ahead and do it your way. :)

Reply via email to