[issue5315] signal handler never gets called

2018-03-29 Thread Patrick Fink
Patrick Fink added the comment: A workaround to handle signals reliably that I successfully tested now is to execute everything within a subthread and let the main thread just join this subthread. Like: signal.signal(MY_SIGNAL, signal_handler) threading.Thread(target = my_main_function) threa

[issue5315] signal handler never gets called

2015-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This was turned into a doc issue, with no patch forthcoming, but Devin has submitted a bugfix. Should this be turned back into a bug issue? -- nosy: +terry.reedy stage: -> patch review versions: +Python 3.4, Python 3.5, Python 3.6 -Python 2.6, Python

[issue5315] signal handler never gets called

2015-05-25 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Adding haypo since apparently he's been touching signals stuff a lot lately, maybe has some useful thoughts / review? :) -- nosy: +haypo ___ Python tracker __

[issue5315] signal handler never gets called

2015-05-24 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Agree with Charles-François's second explanation. This makes it very hard to reliably handle signals -- basically everyone has to remember to use set_wakeup_fd, and most people don't. For example, gunicorn is likely vulnerable to this because it doesn't use

[issue5315] signal handler never gets called

2010-12-30 Thread s7v7nislands
Changes by s7v7nislands : -- nosy: +s7v7nislands ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5315] signal handler never gets called

2010-07-01 Thread Ernesto Menéndez
Changes by Ernesto Menéndez : -- nosy: +Netto ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue5315] signal handler never gets called

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the detailed analysis, Charles-François. > Finally, I think that the documentation should be rephrased: Yes, I think so. > Furthermore, under Linux 2.6 and NPTL, getpid() returns the main thread > PID even from another thread. Yes, those threads b

[issue5315] signal handler never gets called

2010-04-11 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: I think two things can trigger this problem, both have to do with how signals are handled by the interpreter. Contrarily to what you may think, when a signal is received, its handler is _not_ called. Instead, it's Modules/signalmodule.c signal_handler

[issue5315] signal handler never gets called

2010-03-02 Thread Andrew McNabb
Andrew McNabb added the comment: Sorry for the noise. It turns out that my problem was unrelated. -- ___ Python tracker ___ ___ Pytho

[issue5315] signal handler never gets called

2010-03-02 Thread Andrew McNabb
Andrew McNabb added the comment: I'm seeing something very similar to this. In my case, I have a single-threaded program, and select fails to be interrupted by SIGCHLD. I'm still tracking down more details, so I'll report back if I find more information. -- nosy: +amcnabb

[issue5315] signal handler never gets called

2009-02-19 Thread Péter Szabó
New submission from Péter Szabó : According to http://docs.python.org/dev/library/signal.html , if I set up a signal handler in the main thread, and then have the signal delivered to the process, then the signal handler will be called in the main thread. The attached Python script I've written, h