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

You should be able to call fileno on the descriptors and pass them as arguments (either command line or in the environment) and then use either dup(2) or open( HANDLE, "<&$fd" ) (see perlopentut and the docs for open for the exact syntax) to get a proper local endpoint in either C or Perl.

Replies are listed 'Best First'.
Re^2: How to hook up C's socketpair() with Perl's?
by mhutch7714 (Acolyte) on Jul 14, 2006 at 03:32 UTC
    Thanks for the reply. I'm on my way out the door, so I will dig through the doc tonight, and try it in the morning. mhutch
Re^2: How to hook up C's socketpair() with Perl's?
by jesuashok (Curate) on Jul 14, 2006 at 07:32 UTC
    Hi

    Instead of getting fileno from Environment Variable, you can write a program in such a way that read from Shared Memory.

    "Keep pouring your ideas"
      The OP stated that he is running this on unix. The 'disk emulation' concept of shared memory is available under linux and POSIX, but if the unix system isn't POSIX compliant, then the shared memory style to fall back on wouldn't be accessible via a device driver nor is it file-structured. - Oops I thought you meant use a shared memory file until I reread your post.

      -M

      Free your mind