Skip to content

Instantly share code, notes, and snippets.

View limitusus's full-sized avatar
🏠
Working from home

Tomoya Kabe limitusus

🏠
Working from home
View GitHub Profile
@limitusus
limitusus / fdpass.pl
Created February 7, 2013 07:25
Pass a file descriptor from a process to another process through an UNIX socket, with Socket::MsgHdr.
#!/usr/bin/env perl
use strict;
use warnings;
use Socket;
use Socket::MsgHdr;
use IO::Handle;
my ($parent, $child);