Subject: Re: writing to /dev/stderr

From: [email-masked] (Bruce Perens)
Date: Fri, 30 Aug 96 16:27 PDT

I looked at this a little more. It seems that the object on the other
side of /dev/fd/X isn't always one that you have permissions on _after_
it's been opened.

> ls -l /dev/fd/2
lrwx------   1 bruce    bruce 64 Aug 30 16:16 /dev/fd/2 -> [0301]:7060

This means "device 3, 1, inode 7060".

> ls -li `tty`
   7060 crw-rw-rw-   1 root     tty        4, 193 Aug 30 16:16 /dev/ttyp1

Note the "7060".

> ls -li /dev/hda1
   6237 brw-rw----   1 root     disk       3,   1 Dec 31  1969 /dev/hda1

That's the root partition. Note the "3, 1"

It's the permissions of /dev/ttyp1 that apply here, not those of /dev/fd/2 .

        Bruce

---

From: Guy Maor <[email-masked]>
Date: Fri, 30 Aug 1996 19:51:13 -0500 (CDT)

> It's the permissions of /dev/ttyp1 that apply here, not those of /dev/fd/2 .

Just like in a symbolic link.

Guy