open() and pipes

Uri Guttman uri at
Wed Aug 2 16:57:05 BST 2006

>>>>> "PC" == Peter Corlett <abuse at> writes:

  PC> On 1 Aug 2006, at 17:31, Uri Guttman wrote:
  PC> [...]
  >> open only takes one handle for an argument and pipe needs two handles
  >> (for parent and child after forking).

  PC> man 2 socketpair

socketpair and pipe are the same call internally on most/all modern
unixes these days. both create 2 handles for the parent/child for use
after forking. and they don't have any way to attach directly to a
process, that is done by the fork/exec calls. all that is done for you
in ipc::open2/3 which is why that module is there. the problem is solved
already, you just need to code so there is no io deadlock or use async
io which won't block. nuff said.


Uri Guttman  ------  uri at  --------
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------

More information about the mailing list