Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 61450:b966d5835d3b
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:18:57 +0000 |
| parents | 85ac27fa913f |
| children | cab14be0ada1 |
comparison
equal
deleted
inserted
replaced
| 61448:dd1c8ff2e990 | 61450:b966d5835d3b |
|---|---|
| 2252 */ | 2252 */ |
| 2253 PyOS_sighandler_t | 2253 PyOS_sighandler_t |
| 2254 PyOS_setsig(int sig, PyOS_sighandler_t handler) | 2254 PyOS_setsig(int sig, PyOS_sighandler_t handler) |
| 2255 { | 2255 { |
| 2256 #ifdef HAVE_SIGACTION | 2256 #ifdef HAVE_SIGACTION |
| 2257 /* Some code in Modules/signalmodule.c depends on sigaction() being | |
| 2258 * used here if HAVE_SIGACTION is defined. Fix that if this code | |
| 2259 * changes to invalidate that assumption. | |
| 2260 */ | |
| 2257 struct sigaction context, ocontext; | 2261 struct sigaction context, ocontext; |
| 2258 context.sa_handler = handler; | 2262 context.sa_handler = handler; |
| 2259 sigemptyset(&context.sa_mask); | 2263 sigemptyset(&context.sa_mask); |
| 2260 context.sa_flags = 0; | 2264 context.sa_flags = 0; |
| 2261 if (sigaction(sig, &context, &ocontext) == -1) | 2265 if (sigaction(sig, &context, &ocontext) == -1) |
