summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-03-14 06:49:55 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-03-14 06:49:55 (GMT)
commitfb94c5f1e5bb9ccd28bcd311f388db7bea35c865 (patch)
tree7d32df9daaf77314889d2537330055c5ed01245b /Modules/posixmodule.c
parentdddd5e909895508b67b92156bc13ba68329d0d24 (diff)
downloadcpython-fb94c5f1e5bb9ccd28bcd311f388db7bea35c865.zip
cpython-fb94c5f1e5bb9ccd28bcd311f388db7bea35c865.tar.gz
cpython-fb94c5f1e5bb9ccd28bcd311f388db7bea35c865.tar.bz2
* Replaces the internals of the subprocess module from fork through exec on
POSIX systems with a C extension module. This is required in order for the subprocess module to be made thread safe. The pure python implementation is retained so that it can continue to be used if for some reason the _posixsubprocess extension module is not available. The unittest executes tests on both code paths to guarantee compatibility. * Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h. Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index abe6189..a18ef8e 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -303,23 +303,6 @@ extern int lstat(const char *, struct stat *);
#define WAIT_STATUS_INT(s) (s)
#endif /* UNION_WAIT */
-/* Issue #1983: pid_t can be longer than a C long on some systems */
-#if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
-#define PARSE_PID "i"
-#define PyLong_FromPid PyLong_FromLong
-#define PyLong_AsPid PyLong_AsLong
-#elif SIZEOF_PID_T == SIZEOF_LONG
-#define PARSE_PID "l"
-#define PyLong_FromPid PyLong_FromLong
-#define PyLong_AsPid PyLong_AsLong
-#elif defined(SIZEOF_LONG_LONG) && SIZEOF_PID_T == SIZEOF_LONG_LONG
-#define PARSE_PID "L"
-#define PyLong_FromPid PyLong_FromLongLong
-#define PyLong_AsPid PyLong_AsLongLong
-#else
-#error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
-#endif /* SIZEOF_PID_T */
-
/* Don't use the "_r" form if we don't need it (also, won't have a
prototype for it, at least on Solaris -- maybe others as well?). */
#if defined(HAVE_CTERMID_R) && defined(WITH_THREAD)