[Patches] [ python-Patches-466877 ] SIGBREAK is missing from signal module

noreply@sourceforge.net noreply@sourceforge.net
Mon, 01 Oct 2001 09:52:10 -0700


Patches item #466877, was opened at 2001-10-01 09:07
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=466877&group_id=5470

Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Scott (progoth)
Assigned to: Nobody/Anonymous (nobody)
Summary: SIGBREAK is missing from signal module

Initial Comment:
I didn't know if this belonged in Core or Modules.  
It's a trivial change, but I needed it for a project I 
was working on.  I couldn't find any mention of using 
SIGBREAK with python online, so maybe it's not 
supported?  It seems to work fine in the tests I've 
done, although they were nothing extensive.

----------------------------------------------------------------------

>Comment By: Steven Scott (progoth)
Date: 2001-10-01 09:52

Message:
Logged In: YES 
user_id=61663

haha I guess I'm not really up on all the unix stuff 
either:)  so yeah, you can catch it, it would probably be 
useful to have it handled the same as SIGINT, and throw the 
KeyboardInterrupt exception.  Or maybe it shouldn't be the 
same, I would worry about how other people are using it, 
but since the issue hasn't even arisen until now...

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-10-01 09:44

Message:
Logged In: YES 
user_id=6380

Aha. Can you actually catch SIGBREAK? (If so, it's not quite
kill -9 :-)

This might be useful -- we might want to set the default
handler for SIGBREAK that does the same thing as the SIGINT
handler.

----------------------------------------------------------------------

Comment By: Steven Scott (progoth)
Date: 2001-10-01 09:38

Message:
Logged In: YES 
user_id=61663

unfortunately I work in a windows-only shop, and that's 
what I'm doing this for.  I was trying my hardest to figure 
out how to catch a CTRL-Break and not just a CTRL-C, and I 
looked in microsoft's signals.h and saw SIGBREAK.  I assume 
it's a windows only thing.  I'm not really up on all the 
windows stuff, but apparently CTRL-Break is a way to take 
things down harder, I don't know, kill -9 for dos, or 
something.  it doesn't raise a KeyboardException (I'm doing 
this with python 1.5, but the patch is against CVS), but it 
does allow the signal handler to be called in lieu of 
exiting the interpreter.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-10-01 09:22

Message:
Logged In: YES 
user_id=6380

What is SIGBREAK? I don't see it in the Linux man page for
signal(7).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=466877&group_id=5470