open() and pipes

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


>>>>> "PC" == Peter Corlett <abuse at cabal.org.uk> 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

-- 
Uri Guttman  ------  uri at stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


More information about the london.pm mailing list