Python 2.3.3 signals, threads & extensions: signal handling problem

Discussion in 'Python' started by Holger Joukl, Jun 3, 2004.

  1. Holger Joukl

    Holger Joukl Guest

    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.
     
    Holger Joukl, Jun 3, 2004
    #1
    1. Advertising

  2. Holger Joukl

    fishboy Guest

    On Thu, 3 Jun 2004 14:48:05 +0200, "Holger Joukl"
    <> wrote:

    >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,
    ><{{{*>
     
    fishboy, Jun 6, 2004
    #2
    1. Advertising

  3. "Holger Joukl" <> writes on Thu, 3 Jun 2004 14:48:05 +0200:
    > 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.
     
    Dieter Maurer, Jun 7, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank Bossy
    Replies:
    1
    Views:
    472
    Victor Bazarov
    Jul 9, 2003
  2. Jackie

    <signal.h> - question about signals

    Jackie, Jul 28, 2004, in forum: C Programming
    Replies:
    11
    Views:
    589
    Villy Kruse
    Aug 2, 2004
  3. Grzegorz Kokosiñski
    Replies:
    1
    Views:
    325
    Chris
    May 26, 2008
  4. Peter
    Replies:
    34
    Views:
    1,948
    James Kanze
    Oct 17, 2009
  5. hhanff
    Replies:
    8
    Views:
    969
    hhanff
    Jul 23, 2010
Loading...

Share This Page