moving Connection/PipeConnection between processes

Randall Smith randall at tnr.cc
Mon Jun 15 01:58:42 EDT 2009


Now that I've done some homework, everything you said is clear.

Mike Kazantsev wrote:
> 
> Pickle has nothing to do with the problem since it lay much deeper: in
> the OS.
> 
> From kernel point of view, every process has it's own "descriptor
> table" and the integer id of the descriptor is all the process gets, so
> when you say "os.pipe()" kernel actually gives you a number which is
> completely meaningless for any other process - it either doesn't exists
> in it's descriptor table or points to something else.
> 
> So, what you actually need is to tell the kernel to duplicate
> underlying object in another process' table (with it's own numbering),
> which is usually done via special flag for sendmsg(2) in C, so you
> should probably look out for py implementation of this call, which I
> haven't stumbled upon, but, admittely, never looked for.
> 

sendmsg is a missing feature of the socket module.

	http://bugs.python.org/issue1194378

And this implements it:

	http://pypi.python.org/pypi/python-eunuchs/0.0.0






More information about the Python-list mailing list