Bugs item #994023, was opened at 2004-07-19 20:59 Message generated for change (Comment added) made by imbaczek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=994023&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Threads Group: Python 2.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Laurentiu C. Badea (L.C.) (wotevah) Assigned to: Nobody/Anonymous (nobody) Summary: threads duplicated on fork() prevent child from terminating Initial Comment: (This is a repost from an older c.l.py submission to prevent losing track of it) It looks as if fork() duplicates the entire threads info structure in the new process. This causes child processes to attempt to handle or wait for nonexistent threads and causes them to hang on exit. Perhaps clearing Python's internal thread info after the fork() is all that is needed to fix this (the fact that the threads themselves are not duplicated seems to suggest that this was indeed the intention - and also is POSIXly correct). Original post with sample code for the problem is here (also attached for your convenience): http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=e0bf36b5.0306191548.73b7383%40posting.google.com The "bug" manifests itself by the program not exiting voluntarily. The two processes created need to be terminated individually. Last tested on 2.3.3 (Fedora Core 2), but present since 2.1 I believe. ---------------------------------------------------------------------- Comment By: Marek Baczynski (imbaczek) Date: 2007-06-05 20:00 Message: Logged In: YES user_id=838849 Originator: NO Just ran into this in 2.5 on debian testing. Workaround is to setDaemon(True) on the offending threads; this is not documented anywhere, though. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=994023&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
