Python 2.3.3 signals, threads & extensions: signal handling problem

H

Holger Joukl

Hi,
migrating from good old python 1.5.2 to python 2.3, I have a problem
running a program that features some threads which execute calls to
an extension module.
Problem is that all of a sudden, I cannot stop the program with a keyboard
interrupt any more; the installed signal handler does not seem to receive
the signal at all.
This happens both if I rebuild this extension using python 2.3
headers/library
and if I simply use the old extension (ignoring the API version warnings
:)

Any hints?
Btw this is a sun sparc solaris 6 box, python 2.3.3.

G
Holger

Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail. Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.
 
F

fishboy

Hi,
migrating from good old python 1.5.2 to python 2.3, I have a problem
running a program that features some threads which execute calls to
an extension module.
Problem is that all of a sudden, I cannot stop the program with a keyboard
interrupt any more; the installed signal handler does not seem to receive
the signal at all.
This happens both if I rebuild this extension using python 2.3
headers/library
and if I simply use the old extension (ignoring the API version warnings
:)

Any hints?
Btw this is a sun sparc solaris 6 box, python 2.3.3.

G
Holger

http://groups.google.com/groups?hl=...threads+signals&meta=group=comp.lang.python.*

Looking at this search leads me to believe:

1. Threads + signals = bad

2. at some point things were changed to send all signals to the main
thread. (python)

Which leads me to believe that your signal handler is in a sub-thread?

hth,
 
D

Dieter Maurer

Holger Joukl said:
migrating from good old python 1.5.2 to python 2.3, I have a problem
running a program that features some threads which execute calls to
an extension module.
Problem is that all of a sudden, I cannot stop the program with a keyboard
interrupt any more; the installed signal handler does not seem to receive
the signal at all.

python-Bugs-756924 may be related to your problem.

If so, you have a chance that the problem is fixed in Python 2.4.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top