Error on some forked thread termination in python threading module
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.7 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'd like for the fix to python issue 14308 to be ported to python2.7 in Ubuntu Precise.
http://
As near as I can tell, it affects python 2.7 threading.Thread threads which have were are created, call currentThread(), are then forked, and then terminate.
For my purposes, it is affecting some code I wrote which does spawns processes to run simple shell scripts in the background. It also seems to have affected various Django projects as well as Duplicity as per https:/
I was able to easily reproduce this bug with this small test case as per the python bug ticket on Ubuntu Precise Server:
<code>
#!/usr/bin/python
import os
import thread
import threading
import time
def t():
threading.
time.sleep(3)
thread.
time.sleep(1)
pid = os.fork()
if pid == 0:
os._exit(0)
os.waitpid(pid, 0)
</code>
The fix is a simple two-line patch to threading.py implemented by the fix for python bug 14308. I have also attached that, again from http://
As far as I can tell, this has not made its way from upstream to Precise. My sincerest apologies if this is reported elsewhere or my report is somehow inappropriate.
The attachment "Patch from Python Bug 14308" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]