Passing file descriptors in Python?

Greg Ewing greg.ewing at compaq.com
Mon Oct 4 03:55:26 EDT 1999


Guido van Rossum wrote:
> 
> I would guess that creating a
> server AF_UNIX socket in the parent and a client AF_UNIX socket in the
> child, connecting the latter to the former, would allow you to do the
> same thing.

Try using an ordinary pipe first. On BSD-flavoured unices, pipes
are often implemented as a pair of unix-domain sockets.

You'll definitely need sendmsg() and recvmsg(), though, so
you'll still have to write some C.

Greg




More information about the Python-list mailing list