Python 2.3.3 signals, threads & extensions: signal handling problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Holger Joukl

    Python 2.3.3 signals, threads & extensions: signal handling problem

    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.


  • fishboy

    #2
    Re: Python 2.3.3 signals, threads & extensions: signal handling problem

    On Thu, 3 Jun 2004 14:48:05 +0200, "Holger Joukl"
    <Holger.Joukl@L BBW.de> wrote:
    [color=blue]
    >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[/color]



    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,[color=blue]
    ><{{{*>[/color]

    Comment

    • Dieter Maurer

      #3
      Re: Python 2.3.3 signals, threads &amp; extensions: signal handling problem

      "Holger Joukl" <Holger.Joukl@L BBW.de> writes on Thu, 3 Jun 2004 14:48:05 +0200:[color=blue]
      > 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.[/color]

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

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

      Comment

      Working...