[Python-checkins] CVS: python/dist/src/Misc ACKS,1.114,1.115 NEWS,1.264,1.265

Tim Peters tim_one@users.sourceforge.net
2001年10月01日 10:58:42 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv27419/python/Misc
Modified Files:
	ACKS NEWS 
Log Message:
SF patch [#466877] SIGBREAK is missing from signal module.
Patch from Steve Scott to add SIGBREAK support (unique to Windows).
Index: ACKS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** ACKS	2001年10月01日 13:47:46	1.114
--- ACKS	2001年10月01日 17:58:40	1.115
***************
*** 363,366 ****
--- 363,367 ----
 Dietmar Schwertberger
 Barry Scott
+ Steven Scott
 Nick Seidenman
 Fred Sells
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.264
retrieving revision 1.265
diff -C2 -d -r1.264 -r1.265
*** NEWS	2001年10月01日 17:04:03	1.264
--- NEWS	2001年10月01日 17:58:40	1.265
***************
*** 32,35 ****
--- 32,55 ----
 Windows
 
+ - The signal module now supports SIGBREAK on Windows, thanks to Steven
+ Scott. Note that SIGBREAK is unique to Windows. The default SIGBREAK
+ action remains to call Win32 ExitProcess(). This can be changed via
+ signal.signal(). For example:
+ 
+ # Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C
+ # (SIGINT) behavior.
+ import signal
+ signal.signal(signal.SIGBREAK,
+ signal.default_int_handler)
+ 
+ try:
+ while 1:
+ pass
+ except KeyboardInterrupt:
+ # We get here on Ctrl+C or Ctrl+Break now; if we had not changed
+ # SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the
+ # program without the possibility for any Python-level cleanup).
+ print "Clean exit"
+ 
 
 What's New in Python 2.2a4?

AltStyle によって変換されたページ (->オリジナル) /