[Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error
Jarkko Laiho
jarkko.laiho at iki.fi
Mon Mar 16 20:06:37 CET 2009
>> What does an actual, concrete exec() call look like in this case, and
>> at what point in the code should it occur?
> I don't know -- you didn't post your entire program. Read the Wikipedia
> page and follow the refs.
I did and understood just about none of it. Way over my head. But:
> Here's an example:
> [...]
> # figure out how to invoke the actual program
> args = [sys.executable, "-c",
> "import mycode;" +
> "mycode.realmain()"
> ]
> os.execve(sys.executable, args, env)
>[...]
There's a technique I didn't know about. I didn't think there was any
way of making an exec() call fit the existing code, but that might
just do the trick.
I'm pretty sure I can work with that. Thanks for your patient advice!
- Jarkko L.
More information about the Pythonmac-SIG
mailing list