in reply to How to hook up C's socketpair() with Perl's?

The file descriptors may be being closed on exec. See fcntl(2) and Fcntl, specifically the FD_CLOEXEC flag.

The normal way to do this is as frodo72 describes: dup the pipe FDs to the child's STDIN and STDOUT. You may still have to turn off FD_CLOEXEC on them; at any rate it's probably safest and most portable.