* Re: /dev/fd -> /proc/self/fd
@ 1997-03-07 2:42 Tom Culliton
0 siblings, 0 replies; 2+ messages in thread
From: Tom Culliton @ 1997-03-07 2:42 UTC (permalink / raw)
To: culliton, rc
Never mind, I figured it out already. ;-) Here's the patch. And for
those who dislike such things, this one doesn't require any new #if's.
Tom ;-) ;-) ;-)
------------------------------------------------------------------------
*** ../rc-1.5betadev-1/glom.c Sun Mar 6 22:33:00 1994
--- glom.c Thu Mar 6 21:20:17 1997
***************
*** 347,353 ****
walk(n->u[2].p, FALSE);
exit(getstatus());
}
! name = nprint("/dev/fd/%d", p[n->u[0].i != rFrom]);
efd.fd = p[n->u[0].i != rFrom];
except(eFd, efd, e);
close(p[n->u[0].i == rFrom]);
--- 347,353 ----
walk(n->u[2].p, FALSE);
exit(getstatus());
}
! name = nprint(DEVFD, p[n->u[0].i != rFrom]);
efd.fd = p[n->u[0].i != rFrom];
except(eFd, efd, e);
close(p[n->u[0].i == rFrom]);
*** ../rc-1.5betadev-1/config.h-dist Mon May 25 14:12:57 1992
--- config.h-dist Thu Mar 6 21:14:44 1997
***************
*** 47,55 ****
*/
/*
! * Define the macro DEVFD if your system supports /dev/fd.
! #define DEVFD
*/
/*
* Define the macro NOLIMITS if your system does not support Berkeley
--- 47,56 ----
*/
/*
! * Define the macro DEVFD if your system supports /dev/fd or /proc/self/fd.
! #define DEVFD "/dev/fd/%d"
+ #define DEVFD "/proc/self/fd/%d"
*/
/*
* Define the macro NOLIMITS if your system does not support Berkeley
***************
^ permalink raw reply [flat|nested] 2+ messages in thread
* /dev/fd -> /proc/self/fd
@ 1997-03-07 2:02 Tom Culliton
0 siblings, 0 replies; 2+ messages in thread
From: Tom Culliton @ 1997-03-07 2:02 UTC (permalink / raw)
To: rc
I seem to have lost the message that someone recently sent about doing
this, can someone give me a clue? Someone who saved the message?
Someone who has done it? Whoever sent the original message? I swear
I'm not hallucinating, although maybe it was on a different mailing
list or news group...
Failing that, what is the behaviour of /dev/fd? Is it a directory
that "magically" contains numeric filenames corresponding to the
reading processes open fd's like /proc/self/fd? Somebody had to
understand this to implement the original code. ;-)
BTW - Chris, where are the mailing list archives these days?
Thanks!
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-03-07 2:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-07 2:42 /dev/fd -> /proc/self/fd Tom Culliton
-- strict thread matches above, loose matches on Subject: below --
1997-03-07 2:02 Tom Culliton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).