in reply to Re: wait versus close on a pipe
in thread wait versus close on a pipe
One alternative is to create the pipe using IPC::Open[23]. This will allow you to separate the closing of the pipe from the waiting/reaping of the child.
One final comment... I would close the pipes first and then reap the children. In your situation, read whatever data you need from the child , close that child's pipe and then proceed to wait for it to terminate. This also holds if you are sending data to a child via a pipe. In that case, closing your end of the pipe sends EOF to the child which is a conventional way to tell it to finish its processing and exit.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: wait versus close on a pipe (open)
by tye (Sage) on Jun 03, 2008 at 06:40 UTC | |
|
Re^3: wait versus close on a pipe
by kyle (Abbot) on Jun 03, 2008 at 04:14 UTC |