Re: /proc/self/fd/0

Robert Nichols (
Tue, 24 Sep 1996 16:50:47 GMT

Note: E-mailed *and* posted.

In article <>,
Allen D. Harpham <> wrote:
:I have a printer filter that worked under kernel 1.2.13 that is broke
:under 2.04. It looks like the following:
:ln -s /proc/self/fd/0 /tmp/$$.html
:/usr/bin/html2ascii/ /tmp/$$.html|pr
:rm /tmp/$$.html

I don't see how that ever worked. Try changing the link to

ln -s /proc/$$/fd/0 /tmp/$$.html

In the original, the link doesn't resolve to the same place for the
child process as it does for the parent shell since "self" has changed.

Bob Nichols
Finger for PGP public key.
PGP public key 1024/9A9C7955
Key fingerprint = 2F E5 82 F8 5D 06 A2 59  20 65 44 68 87 EC A7 D7