? autom4te.cache ? build-debug ? build-tsc ? foo ? Objects/listobject.c-mine ? Python/compile.c-mine Index: Modules/posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.326 diff -c -r2.326 posixmodule.c *** Modules/posixmodule.c 30 Aug 2004 17:36:46 -0000 2.326 --- Modules/posixmodule.c 14 Sep 2004 17:24:35 -0000 *************** *** 2915,2932 **** master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ if (master_fd < 0) return posix_error(); ! sig_saved = signal(SIGCHLD, SIG_DFL); /* change permission of slave */ if (grantpt(master_fd) < 0) { ! signal(SIGCHLD, sig_saved); return posix_error(); } /* unlock slave */ if (unlockpt(master_fd) < 0) { ! signal(SIGCHLD, sig_saved); return posix_error(); } ! signal(SIGCHLD, sig_saved); slave_name = ptsname(master_fd); /* get name of slave */ if (slave_name == NULL) return posix_error(); --- 2915,2932 ---- master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ if (master_fd < 0) return posix_error(); ! sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL); /* change permission of slave */ if (grantpt(master_fd) < 0) { ! PyOS_setsig(SIGCHLD, sig_saved); return posix_error(); } /* unlock slave */ if (unlockpt(master_fd) < 0) { ! PyOS_setsig(SIGCHLD, sig_saved); return posix_error(); } ! PyOS_setsig(SIGCHLD, sig_saved); slave_name = ptsname(master_fd); /* get name of slave */ if (slave_name == NULL) return posix_error(); Index: Modules/signalmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v retrieving revision 2.75 diff -c -r2.75 signalmodule.c *** Modules/signalmodule.c 17 Jun 2004 15:55:53 -0000 2.75 --- Modules/signalmodule.c 14 Sep 2004 17:24:35 -0000 *************** *** 137,145 **** return; } #endif - #ifdef HAVE_SIGINTERRUPT - siginterrupt(sig_num, 1); - #endif PyOS_setsig(sig_num, signal_handler); } --- 137,142 ---- *************** *** 217,225 **** } else func = signal_handler; - #ifdef HAVE_SIGINTERRUPT - siginterrupt(sig_num, 1); - #endif if (PyOS_setsig(sig_num, func) == SIG_ERR) { PyErr_SetFromErrno(PyExc_RuntimeError); return NULL; --- 214,219 ---- Index: Modules/socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.306 diff -c -r1.306 socketmodule.c *** Modules/socketmodule.c 13 Sep 2004 17:48:41 -0000 1.306 --- Modules/socketmodule.c 14 Sep 2004 17:24:36 -0000 *************** *** 217,223 **** /* Generic includes */ #include ! #include /* Generic socket object definitions and includes */ #define PySocket_BUILDING_SOCKET --- 217,223 ---- /* Generic includes */ #include ! //#include /* Generic socket object definitions and includes */ #define PySocket_BUILDING_SOCKET Index: Parser/intrcheck.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/intrcheck.c,v retrieving revision 2.45 diff -c -r2.45 intrcheck.c *** Parser/intrcheck.c 20 Nov 2003 01:44:58 -0000 2.45 --- Parser/intrcheck.c 14 Sep 2004 17:24:36 -0000 *************** *** 137,143 **** Py_Exit(1); break; } ! signal(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); } --- 137,143 ---- Py_Exit(1); break; } ! PyOS_setsig(SIGINT, intcatcher); Py_AddPendingCall(checksignals_witharg, NULL); } *************** *** 146,168 **** void PyOS_InitInterrupts(void) { ! if ((old_siginthandler = signal(SIGINT, SIG_IGN)) != SIG_IGN) ! signal(SIGINT, intcatcher); ! #ifdef HAVE_SIGINTERRUPT ! /* This is for SunOS and other modern BSD derivatives. ! It means that system calls (like read()) are not restarted ! after an interrupt. This is necessary so interrupting a ! read() or readline() call works as expected. ! XXX On old BSD (pure 4.2 or older) you may have to do this ! differently! */ ! siginterrupt(SIGINT, 1); ! #endif /* HAVE_SIGINTERRUPT */ } void PyOS_FiniInterrupts(void) { ! signal(SIGINT, old_siginthandler); } int --- 146,159 ---- void PyOS_InitInterrupts(void) { ! if ((old_siginthandler = PyOS_setsig(SIGINT, SIG_IGN)) != SIG_IGN) ! PyOS_setsig(SIGINT, intcatcher); } void PyOS_FiniInterrupts(void) { ! PyOS_setsig(SIGINT, old_siginthandler); } int Index: Python/pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.208 diff -c -r2.208 pythonrun.c *** Python/pythonrun.c 19 Aug 2004 11:31:58 -0000 2.208 --- Python/pythonrun.c 14 Sep 2004 17:24:36 -0000 *************** *** 1576,1588 **** initsigs(void) { #ifdef SIGPIPE ! signal(SIGPIPE, SIG_IGN); #endif #ifdef SIGXFZ ! signal(SIGXFZ, SIG_IGN); #endif #ifdef SIGXFSZ ! signal(SIGXFSZ, SIG_IGN); #endif PyOS_InitInterrupts(); /* May imply initsignal() */ } --- 1576,1588 ---- initsigs(void) { #ifdef SIGPIPE ! PyOS_setsig(SIGPIPE, SIG_IGN); #endif #ifdef SIGXFZ ! PyOS_setsig(SIGXFZ, SIG_IGN); #endif #ifdef SIGXFSZ ! PyOS_setsig(SIGXFSZ, SIG_IGN); #endif PyOS_InitInterrupts(); /* May imply initsignal() */ } *************** *** 1646,1663 **** { #ifdef HAVE_SIGACTION struct sigaction context; ! /* Initialize context.sa_handler to SIG_ERR which makes about as ! * much sense as anything else. It should get overwritten if ! * sigaction actually succeeds and otherwise we avoid an ! * uninitialized memory read. ! */ ! context.sa_handler = SIG_ERR; ! sigaction(sig, NULL, &context); return context.sa_handler; #else PyOS_sighandler_t handler; handler = signal(sig, SIG_IGN); ! signal(sig, handler); return handler; #endif } --- 1646,1659 ---- { #ifdef HAVE_SIGACTION struct sigaction context; ! if (sigaction(sig, NULL, &context) == -1) ! return SIG_ERR; return context.sa_handler; #else PyOS_sighandler_t handler; handler = signal(sig, SIG_IGN); ! if (handler != SIG_ERR) ! signal(sig, handler); return handler; #endif } *************** *** 1666,1685 **** PyOS_setsig(int sig, PyOS_sighandler_t handler) { #ifdef HAVE_SIGACTION ! struct sigaction context; ! PyOS_sighandler_t oldhandler; ! /* Initialize context.sa_handler to SIG_ERR which makes about as ! * much sense as anything else. It should get overwritten if ! * sigaction actually succeeds and otherwise we avoid an ! * uninitialized memory read. ! */ ! context.sa_handler = SIG_ERR; ! sigaction(sig, NULL, &context); ! oldhandler = context.sa_handler; context.sa_handler = handler; ! sigaction(sig, &context, NULL); ! return oldhandler; #else ! return signal(sig, handler); #endif } --- 1662,1680 ---- PyOS_setsig(int sig, PyOS_sighandler_t handler) { #ifdef HAVE_SIGACTION ! struct sigaction context, ocontext; context.sa_handler = handler; ! sigemptyset(&context.sa_mask); ! context.sa_flags = 0; ! if (sigaction(sig, &context, &ocontext) == -1) ! return SIG_ERR; ! return ocontext.sa_handler; #else ! PyOS_sighandler_t oldhandler; ! oldhandler = signal(sig, handler); ! #ifdef HAVE_SIGINTERRUPT ! siginterrupt(sig, 1); ! #endif ! return oldhandler; #endif }