summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-11 20:58:20 (GMT)
committerGuido van Rossum <guido@python.org>2001-04-11 20:58:20 (GMT)
commit2242f2fbd0d50546ad79e800efbc6f0a2334bd0b (patch)
tree4f52d18335ba8cec2f482a3d2b7fd1c9a7ee2a9a /Modules
parent11e89c72c1912ce834b6295f023c5096cc384d2a (diff)
downloadcpython-2242f2fbd0d50546ad79e800efbc6f0a2334bd0b.zip
cpython-2242f2fbd0d50546ad79e800efbc6f0a2334bd0b.tar.gz
cpython-2242f2fbd0d50546ad79e800efbc6f0a2334bd0b.tar.bz2
Unixware 7 support by Billy G. Allie (SF patch 413011)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c30
-rw-r--r--Modules/termios.c4
2 files changed, 34 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ce77673..5575b9f 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -89,6 +89,9 @@ corresponding Unix manual entries for more information on calls.";
/* Unix functions that the configure script doesn't check for */
#define HAVE_EXECV 1
#define HAVE_FORK 1
+#if defined(__USLC__) && defined(__SCO_VERSION__) /* SCO UDK Compiler */
+#define HAVE_FORK1 1
+#endif
#define HAVE_GETCWD 1
#define HAVE_GETEGID 1
#define HAVE_GETEUID 1
@@ -1654,6 +1657,30 @@ posix_spawnve(PyObject *self, PyObject *args)
#endif /* HAVE_SPAWNV */
+#ifdef HAVE_FORK1
+static char posix_fork1__doc__[] =
+"fork1() -> pid\n\
+Fork a child process with a single multiplexed (i.e., not bound) thread.\n\
+\n\
+Return 0 to child process and PID of child to parent process.";
+
+static PyObject *
+posix_fork1(self, args)
+ PyObject *self;
+ PyObject *args;
+{
+ int pid;
+ if (!PyArg_ParseTuple(args, ":fork1"))
+ return NULL;
+ pid = fork1();
+ if (pid == -1)
+ return posix_error();
+ PyOS_AfterFork();
+ return PyInt_FromLong((long)pid);
+}
+#endif
+
+
#ifdef HAVE_FORK
static char posix_fork__doc__[] =
"fork() -> pid\n\
@@ -5261,6 +5288,9 @@ static PyMethodDef posix_methods[] = {
{"spawnv", posix_spawnv, METH_VARARGS, posix_spawnv__doc__},
{"spawnve", posix_spawnve, METH_VARARGS, posix_spawnve__doc__},
#endif /* HAVE_SPAWNV */
+#ifdef HAVE_FORK1
+ {"fork1", posix_fork1, METH_VARARGS, posix_fork1__doc__},
+#endif /* HAVE_FORK1 */
#ifdef HAVE_FORK
{"fork", posix_fork, METH_VARARGS, posix_fork__doc__},
#endif /* HAVE_FORK */
diff --git a/Modules/termios.c b/Modules/termios.c
index 3aa8423..1d5e20b 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -324,8 +324,12 @@ static struct constant {
{"B9600", B9600},
{"B19200", B19200},
{"B38400", B38400},
+#ifdef B57600
{"B57600", B57600},
+#endif
+#ifdef B115200
{"B115200", B115200},
+#endif
#ifdef B230400
{"B230400", B230400},
#endif