This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients giampaolo.rodola, kristjan.jonsson, sbt
Date 2012-03-19.14:19:54
SpamBayes Score 6.148146e-07
Marked as misclassified No
Message-id <1332166795.37.0.280388189853.issue14310@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2012-03-19 14:19:55kristjan.jonssonsetrecipients: + kristjan.jonsson, giampaolo.rodola, sbt
2012-03-19 14:19:55kristjan.jonssonsetmessageid: <1332166795.37.0.280388189853.issue14310@psf.upfronthosting.co.za>
2012-03-19 14:19:54kristjan.jonssonlinkissue14310 messages
2012-03-19 14:19:54kristjan.jonssoncreate