This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Linux signals during threads
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: langmead
Priority: normal Keywords: patch

Created on 2004-05-05 17:13 by langmead, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
linuxthreads.diffs langmead, 2004-05-05 17:13 LinuxThreads signal handling changes.
Messages (2)
msg45953 - (view) Author: Andrew Langmead (langmead) Date: 2004-05-05 17:13
The Linux implementation of pthreads in the 2.0 through 2.4 
(called LinuxThreads <http://pauillac.inria.fr/~xleroy/
linuxthreads/>)  has one notable place where it diverges 
from the pthreads standard. A signal caused by a thread will 
only trigger the signal handler on that thread, and it is not 
seen or able to be handled by any other thread. The 
LinuxThreads package was first created in 1996 and is only 
now starting to be replaced by the new Linux 2.6 threading 
facility (called NPTL.)

The non-standard LinuxThreads behavior  falls afoul with 
Python's thread semantics, since it assumes that only the 
main thread can set or act on signal handlers. For the 
pthreads environment, it enforces this by blocking signals on 
all threads except the main thread. On LinuxThreads, this 
causes these signals to become ignored and lost, sometimes 
causing deadlock.

The enclosed patch tests for LinuxThread's specific 
peculiarities in the configure script and adjusts the handling 
of thread creation and signal handling in order to give 
threads the documented Python thread and signal behavior.
msg45954 - (view) Author: Andrew Langmead (langmead) Date: 2004-05-26 14:51
Logged In: YES 
user_id=119306

http://sourceforge.net/tracker/
?func=detail&aid=960406&group_id=5470&atid=305470 might be a 
better solution.
History
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40220
2004-05-05 17:13:41langmeadcreate