home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!pdn!bcutter
- From: bcutter@pdnis.paradyne.com (Brooks Cutter)
- Subject: How to communicate both ways with a sub-process...
- Message-ID: <1992Sep8.014546.2605@pdnis.paradyne.com>
- Sender: bcutter@paradyne.com
- Organization: AT&T Paradyne, Largo Florida
- Date: Tue, 8 Sep 92 01:45:46 GMT
- Lines: 39
-
-
- I looked and looked and looked, but alas I couldn't find any info on
- this in the O'Reilly Perl book... (I'll find the info right after I
- finish this post, I'm sure...)
-
-
- I'm looking for a way to open a two-way pipe with a sub-process...
-
- I'd like to use this method to open a connection to telnet, ftp, etc.
-
- (Yes, I'm aware of ftp.pl and chat2.pl -- However we are on the AT&T R&D
- Internet and to get to the REAL internet we have to go through a custom
- AT&T Proxy gateway... Rather than convert the constantly evolving library
- routines from C, or re-linking perl with the libraries each time, I'd
- like to use the telnet/ftp binaries that will be updated as often...
- (Yes I've mastered the first great virtue of a programmer...)
- I've also had problems with ftp.pl talking to a IBM (ack) Mainframe
- running MVS and IBM's TCP/IP Ver 2 Rel 2 -- Talking to ftp rather
- than directly to the daemon should solve this problem)
-
- So Anyways... Is there a way to open a 2-way pipe or a package that
- simulates this? The only thing I could think of is creating a named
- pipe and using that as the output/input for the program...
-
- Yes I'm aware of the possibilities of deadlock... However the prompts
- are well defined (for ftp at least) and I hope to avoid this...
-
- (On a related note: I noticed that ftp attempts to read the password
- from the terminal directly - instead of from stdin. Can I fool ftp
- with perl, or will I need to recompile it taking this out?)
-
- Thanks...
-
-
- --
- Brooks Cutter (I: bcutter@pdnis.paradyne.com)
- (U: ...uunet!pdn!pdnis!bcutter)
- Unix System Administrator, Information Services
- AT&T Paradyne, Largo Florida
-