Transfer socket connection between programs
grante at visi.com
Mon Nov 12 20:50:59 CET 2007
On 2007-11-12, JamesHoward <James.w.Howard at gmail.com> wrote:
> Does anyone know any method to have one program, acting as a
> server transfer a socket connection to another program?
The only way I know of is to use fork. When you fork a
process, all open file-descriptors (including network
connections) are inherited by the child.
> I looked into transferring the connection via xml rpc to no
I've no idea how that could work (even in theory) on any OS
with which I'm familiar.
> It seems to be a problem of getting access to a programs
> private memory space and giving another program access to that
Private memory has nothing to do with it. The connection is a
data structure that lives in kernel space, not in user space.
Even if you could grant another process access to your "private
memory space", it wouldn't help you "transfer a socket
connection", since that connection is something the OSes
Grant Edwards grante Yow! ! Everybody out of
at the GENETIC POOL!
More information about the Python-list