[Python-checkins] commit of r41554 - in python/trunk: Misc Python
martin.v.loewis@python.org
martin.v.loewis at python.org
Mon Nov 28 18:34:29 CET 2005
Author: martin.v.loewis
Date: Mon Nov 28 18:34:23 2005
New Revision: 41554
Modified:
python/trunk/Misc/ACKS
python/trunk/Misc/NEWS
python/trunk/Python/pythonrun.c
Log:
Patch #1350409: Port signal handling to VS 2005.
Modified: python/trunk/Misc/ACKS
==============================================================================
--- python/trunk/Misc/ACKS (original)
+++ python/trunk/Misc/ACKS Mon Nov 28 18:34:23 2005
@@ -113,6 +113,7 @@
Nicolas Chauvat
Michael Chermside
Albert Chin-A-Young
+Adal Chiriliuc
Tom Christiansen
Vadim Chugunov
David Cinege
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon Nov 28 18:34:23 2005
@@ -12,6 +12,8 @@
Core and builtins
-----------------
+- Patch #1350409: Work around signal handling bug in Visual Studio 2005.
+
- Bug #1281408: Py_BuildValue now works correct even with unsigned longs
and long longs.
Modified: python/trunk/Python/pythonrun.c
==============================================================================
--- python/trunk/Python/pythonrun.c (original)
+++ python/trunk/Python/pythonrun.c Mon Nov 28 18:34:23 2005
@@ -1615,6 +1615,23 @@
return context.sa_handler;
#else
PyOS_sighandler_t handler;
+/* Special signal handling for the secure CRT in Visual Studio 2005 */
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+ switch (sig) {
+ /* Only these signals are valid */
+ case SIGINT:
+ case SIGILL:
+ case SIGFPE:
+ case SIGSEGV:
+ case SIGTERM:
+ case SIGBREAK:
+ case SIGABRT:
+ break;
+ /* Don't call signal() with other values or it will assert */
+ default:
+ return SIG_ERR;
+ }
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
handler = signal(sig, SIG_IGN);
if (handler != SIG_ERR)
signal(sig, handler);
More information about the Python-checkins
mailing list