[Python-checkins] python/dist/src/Modules posixmodule.c, 2.327,
2.328 signalmodule.c, 2.75, 2.76 socketmodule.c, 1.307, 1.308
anthonybaxter at users.sourceforge.net
anthonybaxter at users.sourceforge.net
Wed Oct 13 16:48:53 CEST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27121/Modules
Modified Files:
posixmodule.c signalmodule.c socketmodule.c
Log Message:
Patch #975056 - fixes for restartable signals on *BSD. In addition,
a few remaining calls to signal() were converted to PyOS_setsig().
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.327
retrieving revision 2.328
diff -u -d -r2.327 -r2.328
--- posixmodule.c 27 Sep 2004 19:54:33 -0000 2.327
+++ posixmodule.c 13 Oct 2004 14:48:49 -0000 2.328
@@ -2903,18 +2903,18 @@
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);
+ sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL);
/* change permission of slave */
if (grantpt(master_fd) < 0) {
- signal(SIGCHLD, sig_saved);
+ PyOS_setsig(SIGCHLD, sig_saved);
return posix_error();
}
/* unlock slave */
if (unlockpt(master_fd) < 0) {
- signal(SIGCHLD, sig_saved);
+ PyOS_setsig(SIGCHLD, sig_saved);
return posix_error();
}
- signal(SIGCHLD, sig_saved);
+ PyOS_setsig(SIGCHLD, sig_saved);
slave_name = ptsname(master_fd); /* get name of slave */
if (slave_name == NULL)
return posix_error();
Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.75
retrieving revision 2.76
diff -u -d -r2.75 -r2.76
--- signalmodule.c 17 Jun 2004 15:55:53 -0000 2.75
+++ signalmodule.c 13 Oct 2004 14:48:50 -0000 2.76
@@ -137,9 +137,6 @@
return;
}
#endif
-#ifdef HAVE_SIGINTERRUPT
- siginterrupt(sig_num, 1);
-#endif
PyOS_setsig(sig_num, signal_handler);
}
@@ -217,9 +214,6 @@
}
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;
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -d -r1.307 -r1.308
--- socketmodule.c 28 Sep 2004 02:19:40 -0000 1.307
+++ socketmodule.c 13 Oct 2004 14:48:50 -0000 1.308
@@ -217,7 +217,7 @@
/* Generic includes */
#include <sys/types.h>
-#include <signal.h>
+//#include <signal.h>
/* Generic socket object definitions and includes */
#define PySocket_BUILDING_SOCKET
More information about the Python-checkins
mailing list