Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

fd passing

Today's goal was to learn how file descriptor passing works in Unix.

I couldn't find a Perl module to do it so I set off writing it in C, with the hope to understand it well enough to implement it in Perl. So I wrote it in C, got it working, and started to implement it in Perl, quickly finding:

... which is exactly what I need. And reasonably portable. The act of writing it in C just led me down the road of knowing the right keywords to look for (namely "sendmsg"), which made me find this module, which led me to FDpasser.

The next goal is ripping out all the non-portable Linux::AIO code in Perlbal to instead do sync operations in child threads using fd passing.
Tags: perl, tech

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.