tech-kern archive

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

Re: procfs files vs symlink



On Tue, Jan 11, 2022 at 11:10:24AM +0100, Manuel Bouyer wrote:
 > The attached diff changes the procfs behavior to match the linux one, for
 > linux processes:
 > comore:/home/bouyer>ls -l /proc/self/fd/
 > total 1
 > crw--w----  1 bouyer  tty    5, 0 Jan 11 11:08 0
 > crw--w----  1 bouyer  tty    5, 0 Jan 11 11:08 1
 > crw--w----  1 bouyer  tty    5, 0 Jan 11 11:08 2
 > lr-xr-xr-x  1 bouyer  staff   512 Jan 11 11:08 3 -> /home/bouyer
 > 
 > ls: /proc/self/fd//4: Invalid argument
 > lr-xr-xr-x  1 bouyer  staff     0 Jan 11 11:08 4

What causes that EINVAL?

also beware -- the linux world expects regular files to have canonical
paths, and that's just not true elsewhere and can't really be papered
over.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index