Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!usenet.ins.cwru.edu!tut.cis.ohio-state.edu!sei!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!ea08+ From: ea08+@andrew.cmu.edu (Eric A. Anderson) Newsgroups: comp.lang.perl Subject: Re: read/write pipe Message-ID: Date: 28 Feb 91 06:01:41 GMT References: <1991Feb25.023300.7836@uvaarpa.Virginia.EDU> Organization: Carnegie Mellon, Pittsburgh, PA Lines: 27 In-Reply-To: <1991Feb25.023300.7836@uvaarpa.Virginia.EDU> marc@athena.mit.edu (Marc Horowitz) writes: > |> From the keyboard of marc@mit.edu: > |> :I know this has been mentioned here before, but I don't remember what > |> :the reasons were. Why is open(FOO,"|cat|") (a pipe to a program which > |> :I can read from and write to) not supported? > |> > |> From the FAQ: > |> > |> 20) How do I open a pipe both to and from a command? > |> > |> In general, this is a dangerous move because you can find yourself in > |> deadlock situation. It's better to put one end of the pipe to a file. For whatever reason, I found that open(FOO,'ftp |'); allowed me to do both writes and reads from FOO. Is this a mis-feature or something? Because I find this fundamentaly useful, I want a program which can do things with ftp sessions. (Primarily, get all files under some directory subject to certain constraints.) The only other way to do this would be to write a C program containing all of ftp which seems like overkill. Am I in risk of a deadlock or something? -Eric ********************************************************* "My life is full of additional complications spinning around until it makes my head snap off." -Unc. Known. "You are very smart, shut up." -In "The Princess Bride" *********************************************************