Article View: comp.windows.misc
Article #786comamnds into pipes (was: Icons, pipes, etc.)
From: Mike (My watch has windows) Meye...
Date: Thu, 06 Aug 1987 19:23
Date: Thu, 06 Aug 1987 19:23
37 lines
2218 bytes
2218 bytes
[Cross-posted to comp.misc, where it belongs, and followups pointer that way.] In article <555@its63b.ed.ac.uk> xsimon@its63b.ed.ac.uk (Simon Brown) writes: <You can also implement this on a system that has FIFO special files. This <has the advantage that the filenames that are passwd to the program are <not forced to be of that special form /dev/fd/[number] - anything will do, <so long as you can mknod a fifo with that name! You can do that with the /dev/fd driver, under the exact same constraints. All you need is the ability to get a file name that references the correct major/minor device number. The only advantage I see for fifos is that non-root users may be able to mknod them, whereas they can't mknod a device. But in practice (on BSD, anyway) that's not much of a problem. All you need to do is create a symlink to the appropriate /dev/fd file. For example, a couple of times I've wanted to compile stuff coming out of a pipe. The sequence is like so: ln -s /dev/stdin pipeout.c <pipe of stuff> | cc pipeout.c <repeat above until happy> rm pipeout.c Works like a charm. On the other hand, the /dev/fd driver gives you /dev/stdin and friends. These are worth having all by their lonesome, and I don't think they can be duplicated by fifos. <mike -- It's been a hard day's night, Mike Meyer And I been working like a dog. mwm@berkeley.edu It's been a hard day's night, ucbvax!mwm I should be sleeping like a log. mwm@ucbjade.BITNET
Technical Details
Message-ID:
<4615@jade.BERKELEY.EDU>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rutgers!labrea!aurora!ames!sdcsvax!ucbvax!jade!eris!mwmReferences:
<8705190042.AA14664@cogsci.berkeley.edu>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rutgers!labrea!aurora!ames!sdcsvax!ucbvax!jade!eris!mwm From: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) Newsgroups: comp.windows.misc,comp.misc Subject: comamnds into pipes (was: Icons, pipes, etc.) Message-ID: <4615@jade.BERKELEY.EDU> Date: Thu, 6-Aug-87 15:23:07 EDT Article-I.D.: jade.4615 Posted: Thu Aug 6 15:23:07 1987 Date-Received: Sat, 8-Aug-87 19:19:25 EDT References: <8705190042.AA14664@cogsci.berkeley.edu> Sender: usenet@jade.BERKELEY.EDU Reply-To: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) Followup-To: comp.misc Organization: Missionaria Phonibalonica Lines: 37