File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111#define Py_file_input 257
112112#define Py_eval_input 258
113113
114- #ifdef _GNU_PTH
114+ #ifdef HAVE_PTH
115115/* GNU pth user-space thread support */
116116#include <pth.h>
117117#endif
Original file line number Diff line number Diff line change 6262 handler ignores signals if getpid() isn't the same as in the main
6363 thread. XXX This is a hack.
6464
65+ GNU pth is a user-space threading library, and as such, all threads
66+ run within the same process. In this case, if the currently running
67+ thread is not the main_thread, send the signal to the main_thread.
6568*/
6669
6770#ifdef WITH_THREAD
@@ -109,6 +112,12 @@ static void
109112signal_handler (int sig_num )
110113{
111114#ifdef WITH_THREAD
115+ #ifdef WITH_PTH
116+ if (PyThread_get_thread_ident () != main_thread ) {
117+ pth_raise (* (pth_t * ) main_thread , sig_num );
118+ return ;
119+ }
120+ #endif
112121 /* See NOTES section above */
113122 if (getpid () == main_pid ) {
114123#endif
Original file line number Diff line number Diff line change @@ -109,13 +109,14 @@ void PyThread_init_thread(void)
109109#include "thread_lwp.h"
110110#endif
111111
112- #ifdef _GNU_PTH
112+ #ifdef HAVE_PTH
113113#include "thread_pth.h"
114- #else
114+ #undef _POSIX_THREADS
115+ #endif
116+
115117#ifdef _POSIX_THREADS
116118#include "thread_pthread.h"
117119#endif
118- #endif
119120
120121#ifdef C_THREADS
121122#include "thread_cthread.h"
Original file line number Diff line number Diff line change 3535 This is the case on Motorola V4 (R40V4.2) */
3636#undef GETTIMEOFDAY_NO_TZ
3737
38- /* Define if you have GNU PTH threads */
39- #undef _GNU_PTH
40-
4138/* Define this if your time.h defines altzone */
4239#undef HAVE_ALTZONE
4340
6562/* Define if your compiler supports function prototypes */
6663#undef HAVE_PROTOTYPES
6764
65+ /* Define if you have GNU PTH threads */
66+ #undef HAVE_PTH
67+
6868/* Define if your compiler supports variable length function prototypes
6969 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
7070#undef HAVE_STDARG_PROTOTYPES
Original file line number Diff line number Diff line change 103103 This is the case on Motorola V4 (R40V4.2) */
104104#undef GETTIMEOFDAY_NO_TZ
105105
106- /* Define if you have GNU PTH threads */
107- #undef _GNU_PTH
108-
109106/* Define this if your time.h defines altzone */
110107#undef HAVE_ALTZONE
111108
130127/* Define if your compiler supports function prototypes */
131128#undef HAVE_PROTOTYPES
132129
130+ /* Define if you have GNU PTH threads */
131+ #undef HAVE_PTH
132+
133133/* Define if your compiler supports variable length function prototypes
134134 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
135135#undef HAVE_STDARG_PROTOTYPES
272272/* The number of bytes in a void *. */
273273#undef SIZEOF_VOID_P
274274
275+ /* Define if you have the _getpty function. */
276+ #undef HAVE__GETPTY
277+
275278/* Define if you have the alarm function. */
276279#undef HAVE_ALARM
277280
359362/* Define if you have the getpid function. */
360363#undef HAVE_GETPID
361364
362- /* Define if you have the _getpty function. */
363- #undef HAVE__GETPTY
364-
365365/* Define if you have the getpwent function. */
366366#undef HAVE_GETPWENT
367367
521521/* Define if you have the waitpid function. */
522522#undef HAVE_WAITPID
523523
524- /* Define if you have the <db_185 .h> header file. */
525- #undef HAVE_DB_185_H
524+ /* Define if you have the <db .h> header file. */
525+ #undef HAVE_DB_H
526526
527527/* Define if you have the <db1/ndbm.h> header file. */
528528#undef HAVE_DB1_NDBM_H
529529
530- /* Define if you have the <db .h> header file. */
531- #undef HAVE_DB_H
530+ /* Define if you have the <db_185 .h> header file. */
531+ #undef HAVE_DB_185_H
532532
533533/* Define if you have the <dirent.h> header file. */
534534#undef HAVE_DIRENT_H
You can’t perform that action at this time.
0 commit comments