object references/memory access
Paul Rubin
http
Sun Jul 1 11:42:16 EDT 2007
"Martin v. Löwis" <martin at v.loewis.de> writes:
> No. The CGI script has a file handle, and it is not possible to pass
> a file handle to a different process.
>
> > If there is not a good Pythonic way to do the above, I am open to
> > mixing in some C to do the job if that is what it takes.
>
> No, it's not Python that fails to support that - it's the operating
> system. See above for solutions that avoid one such copying in
> the first place.
If this is a Linux server, it might be possible to use the SCM_RIGHTS
message to pass the socket between processes. That would require a
patch to Python's socket library which I've never gotten around to
writing but it's been on my want-to-do list for a long time. There is
something similar for Solaris and probably for *BSD. I've been under
the impression that this is how preforked Apache distributes requests
between processes, but I never got around to checking.
http://sourceforge.net/tracker/index.php?func=detail&aid=814689&group_id=5470&atid=355470
More information about the Python-list
mailing list