Kristján Valur Jónsson <krist...@ccpgames.com> added the comment:

I like the idea of having a frominfo() function.  Though "info" is maybe too 
generic?  Also, dupinfo() is probably better than duplicate, even though there 
is no dup involved.

But I also wonder if we can make this windows/unix agnostic?
on unix, you would achieve the same thing by:
1) getting fd with fileno()
2) sending it over a unix domain socket using sendmsg() (used for duplicating 
fds betwerrn processes
3) calling fromfd() on the target host.

We could have a uniform process (more or less) if dupinfo(pid) would return a 
string containing the fileno on linux, and frominfo() were to accept such a 
string too.  The differeince between linux/windows would then be that linux 
needs to transfer the "info" between processes using the "magic" sendmsg() 
control info ona UNIX domain sock, whereas on Windows one can use whatever RPC 
one wishes.  To implement this, we could therefore have special "sendinfo" and 
"recvinfo" functions.

The process would then become, on either platform:
1) info = dupinfo(pid)
2) sendinfo(info)/info=recvinfo()
3) frominfo(info)

But again: "info" is very generic here.  any suggestions for a better name?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14310>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to