Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!decwrl!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.unix.questions Subject: Re: pipes and stderr Message-ID: <3046@bacchus.dec.com> Date: 17 Mar 90 00:07:59 GMT References: |, pipes, stderr Sender: news@decwrl.dec.com Reply-To: klee@decwrl.dec.com Organization: DEC Western Software Laboratory Lines: 16 In article , razdan@chanakya.oakhill.uucp (Anshuman Razdan) writes: > My problem is how to trap the the stderr coming from the child and direct them to > stdin of the parent. Presumably you are using dup() or dup2() to map the child's stdout to your pipe. You can do another dup2 to map stderr to the same pipe. Alternatively, you can open a separate pipe to handle the stderr. If you use 2 pipes, you can use select() or XtAppAddInput() on the parent side to manage them. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee