comparison Python/pythonrun.c @ 61452:677511edf05c 3.1

Merged revisions 81016 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81016 | jean-paul.calderone | 2010-05-08 23:18:57 -0400 (Sat, 08 May 2010) | 9 lines Merged revisions 81007 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line Skip signal handler re-installation if it is not necessary. Issue 8354. ........ ................
author Jean-Paul Calderone <exarkun@divmod.com>
date Sun, 09 May 2010 03:25:16 +0000
parents a366d631a629
children f197407bdba2
comparison
equal deleted inserted replaced
61449:1139b5d996b0 61452:677511edf05c
2235 2235
2236 PyOS_sighandler_t 2236 PyOS_sighandler_t
2237 PyOS_setsig(int sig, PyOS_sighandler_t handler) 2237 PyOS_setsig(int sig, PyOS_sighandler_t handler)
2238 { 2238 {
2239 #ifdef HAVE_SIGACTION 2239 #ifdef HAVE_SIGACTION
2240 /* Some code in Modules/signalmodule.c depends on sigaction() being
2241 * used here if HAVE_SIGACTION is defined. Fix that if this code
2242 * changes to invalidate that assumption.
2243 */
2240 struct sigaction context, ocontext; 2244 struct sigaction context, ocontext;
2241 context.sa_handler = handler; 2245 context.sa_handler = handler;
2242 sigemptyset(&context.sa_mask); 2246 sigemptyset(&context.sa_mask);
2243 context.sa_flags = 0; 2247 context.sa_flags = 0;
2244 if (sigaction(sig, &context, &ocontext) == -1) 2248 if (sigaction(sig, &context, &ocontext) == -1)