Message92054
The test case is attached. On Mac OS X (and presumably FreeBSD, which
has the same behavior) when you try to exec from a process that has any
other threads in it, you get an OSError, "Operation not supported".
Here's the output on my MacBook:
Traceback (most recent call last):
File "daemon_exec.py", line 16, in <module>
main()
File "daemon_exec.py", line 13, in main
os.execl('echo', 'hello world')
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/os.py",
line 312, in execl
execv(file, args)
OSError: [Errno 45] Operation not supported
And on my Linux box:
hello world
Here's a similar bug that OCaml had to deal with:
http://caml.inria.fr/mantis/view.php?id=4666
I think it's reasonable for Python to declare this to be a limitation of
the OS, but considering that the other thread could be a daemon thread
that the user doesn't really care about, I think it would be reasonable
for Python to kill the other threads in the process before execing.
That's what happens on Linux, anyway.
I ran into this problem while trying to add a persistent background
compilation thread to unladen swallow, and wondered if having any other
threads would trigger the same exception.
It's tempting to just write this off, but I figured it should be
documented or left open as a low priority defect. |
|
Date |
User |
Action |
Args |
2009-08-29 03:19:48 | rnk | set | recipients:
+ rnk, ronaldoussoren |
2009-08-29 03:19:48 | rnk | set | messageid: <1251515988.29.0.608870203555.issue6800@psf.upfronthosting.co.za> |
2009-08-29 03:19:46 | rnk | link | issue6800 messages |
2009-08-29 03:19:45 | rnk | create | |
|