home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!sol.ctr.columbia.edu!ursa!buzz
- From: buzz@toxicavenger.bear.com (Buzz Moschetti)
- Newsgroups: comp.lang.perl
- Subject: Re: Process question...
- Message-ID: <BUZZ.92Jul22205552@toxicavenger.bear.com>
- Date: 23 Jul 92 00:55:52 GMT
- References: <1992Jul22.231637.23043@cs.unca.edu>
- Sender: news@ursa.UUCP
- Reply-To: buzz@fsrg.bear.com
- Organization: Bear, Stearns & Co. Inc.
- Lines: 24
- In-reply-to: mcmahan@cs.unca.edu's message of 22 Jul 92 23:16:37 GMT
-
- In article <1992Jul22.231637.23043@cs.unca.edu> mcmahan@cs.unca.edu (Scott McMahan -- Genesis mailing list owner) writes:
-
- This has stumped me.
-
- I want to fork off a process, but be able to read the forked
- processes' stdout in the parent, as well as feed the forked process
- stdin from the parent. Preferably an execed process. :)
-
- ________________
- | main ^ V |
- ________|____|_|
- ?| ?| stdin __________________
- | |---------------->| forked process |
- | -----V------------
- |<--------------------------| stdout
-
- How to do this in perl has baffled me, and I don't see it in the FAQ.
- I suspect there's some kind of file or pipe involved, but beyond that
- I'm lost.
-
- [...deleted...]
-
- Check out Randall's chat2.pl in your perl's library distribution. It
- uses pty's, but you can probably hack to suit your needs.
-