On Tue, 2020-02-11 at 06:16 -0800, Samuel Thibault wrote: > Florian Weimer, le mar. 11 févr. 2020 15:06:43 +0100, a ecrit: > > > Samuel Thibault, le mar. 11 févr. 2020 05:47:30 -0800, a ecrit: > > > > Florian Weimer, le mar. 11 févr. 2020 14:39:23 +0100, a ecrit: > > > > > Does Hurd support /proc/self/fd, in the sense that the POSIX functions > > > > > in glibc (such as openat) can deal with such paths? > > > > > > > > Not yet but that could be added quite easily with some magic > > > > translation. > > > > > > Ah, actually it's already supported in /dev/fd (but we can add a symlink > > > in /proc/self for compatibility). > > > > Does this mean if we generate paths starting with /dev/fd/, we already > > have this functionality today?
There are already symlinks there: ls -l /proc/self/fd/ total 0 lrwx------ 1 srs srs 64 Feb 11 14:48 0 -> /dev/pts/1 lrwx------ 1 srs srs 64 Feb 11 14:48 1 -> /dev/pts/1 lrwx------ 1 srs srs 64 Feb 11 14:48 2 -> /dev/pts/1 lr-x------ 1 srs srs 64 Feb 11 14:48 3 -> /proc/2872/fd ls -l /dev/fd/ total 0 lrwx------ 1 srs srs 64 Feb 11 17:38 0 -> /dev/pts/1 lrwx------ 1 srs srs 64 Feb 11 17:38 1 -> /dev/pts/1 lrwx------ 1 srs srs 64 Feb 11 17:38 2 -> /dev/pts/1 lr-x------ 1 srs srs 64 Feb 11 17:38 3 -> /proc/2982/fd ls -l /dev/pts/ total 0 crw--w---- 1 srs tty 136, 0 Feb 11 14:38 0 crw--w---- 1 srs tty 136, 1 Feb 11 17:39 1 c--------- 1 root root 5, 2 Dec 13 11:55 ptmx