]> granicus.if.org Git - python/commitdiff
Issue #18774: Remove last bits of GNU PTH thread code, patch by Vajrasky Kok.
authorChristian Heimes <christian@cheimes.de>
Sun, 18 Aug 2013 10:43:24 +0000 (12:43 +0200)
committerChristian Heimes <christian@cheimes.de>
Sun, 18 Aug 2013 10:43:24 +0000 (12:43 +0200)
Misc/NEWS
Modules/signalmodule.c

index d2f19ac711da4da4fb07ce166e4b5a2c5c8de20f..c156b1dbd3abcdfb996c46f5ef53553c15add3ce 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ Projected Release date: 2013-09-08
 Core and Builtins
 -----------------
 
+- Issue #18774: Remove last bits of GNU PTH thread code and thread_pth.h.
+
 - Issue #16105: When a signal handler fails to write to the file descriptor
   registered with ``signal.set_wakeup_fd()``, report an exception instead
   of ignoring the error.
index bc99f23c2819bd88aad91627f5997281ee39a508..9a0e8e336516119249c4904153731fa281ce2fa4 100644 (file)
    a working implementation that works in all three cases -- the
    handler ignores signals if getpid() isn't the same as in the main
    thread.  XXX This is a hack.
-
-   GNU pth is a user-space threading library, and as such, all threads
-   run within the same process. In this case, if the currently running
-   thread is not the main_thread, send the signal to the main_thread.
 */
 
 #ifdef WITH_THREAD
@@ -214,13 +210,6 @@ signal_handler(int sig_num)
 {
     int save_errno = errno;
 
-#if defined(WITH_THREAD) && defined(WITH_PTH)
-    if (PyThread_get_thread_ident() != main_thread) {
-        pth_raise(*(pth_t *) main_thread, sig_num);
-    }
-    else
-#endif
-    {
 #ifdef WITH_THREAD
     /* See NOTES section above */
     if (getpid() == main_pid)
@@ -242,7 +231,6 @@ signal_handler(int sig_num)
      * makes this true.  See also issue8354. */
     PyOS_setsig(sig_num, signal_handler);
 #endif
-    }
 
     /* Issue #10311: asynchronously executing signal handlers should not
        mutate errno under the feet of unsuspecting C code. */