lkml.org 
[lkml]   [1996]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: /proc/self/fd/0
Date
Note: E-mailed *and* posted.

In article <Pine.LNX.3.94.960923170043.12594B-100000@nebland.cnweb.com>,
Allen D. Harpham <aharpham@cnweb.com> wrote:
:
:I have a printer filter that worked under kernel 1.2.13 that is broke
:under 2.04. It looks like the following:
:
:#!/bin/sh
:ln -s /proc/self/fd/0 /tmp/$$.html
:/usr/bin/html2ascii/html-to-ascii.pl /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 rnichols@interaccess.com
Finger rnichols@cluster.interaccess.com 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

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.035 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site