Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 61445:fb719049044f 2.6
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 | Sat, 08 May 2010 21:11:28 +0000 |
| parents | 8d8c9bf2a04e |
| children | e38335d4df91 |
comparison
equal
deleted
inserted
replaced
| 61428:24ec72594196 | 61445:fb719049044f |
|---|---|
| 1865 | 1865 |
| 1866 PyOS_sighandler_t | 1866 PyOS_sighandler_t |
| 1867 PyOS_setsig(int sig, PyOS_sighandler_t handler) | 1867 PyOS_setsig(int sig, PyOS_sighandler_t handler) |
| 1868 { | 1868 { |
| 1869 #ifdef HAVE_SIGACTION | 1869 #ifdef HAVE_SIGACTION |
| 1870 /* Some code in Modules/signalmodule.c depends on sigaction() being | |
| 1871 * used here if HAVE_SIGACTION is defined. Fix that if this code | |
| 1872 * changes to invalidate that assumption. | |
| 1873 */ | |
| 1870 struct sigaction context, ocontext; | 1874 struct sigaction context, ocontext; |
| 1871 context.sa_handler = handler; | 1875 context.sa_handler = handler; |
| 1872 sigemptyset(&context.sa_mask); | 1876 sigemptyset(&context.sa_mask); |
| 1873 context.sa_flags = 0; | 1877 context.sa_flags = 0; |
| 1874 if (sigaction(sig, &context, &ocontext) == -1) | 1878 if (sigaction(sig, &context, &ocontext) == -1) |
