summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-04 20:23:49 (GMT)
committerGuido van Rossum <guido@python.org>1991-06-04 20:23:49 (GMT)
commit0481447f4135c11d42ae25f55696af8e8d52fe74 (patch)
tree9891fdda01c0ddb15e91117a59d7b2ca6cb5aec4 /Modules
parent065d71e271d753625e91cf2a7cd471ace5617928 (diff)
downloadcpython-0481447f4135c11d42ae25f55696af8e8d52fe74.zip
cpython-0481447f4135c11d42ae25f55696af8e8d52fe74.tar.gz
cpython-0481447f4135c11d42ae25f55696af8e8d52fe74.tar.bz2
Added getpgrp(); fixed buggy calls to getnoarg().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 3a1d4ba..9af13b9 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -515,17 +515,27 @@ posix_getpid(self, args)
object *self;
object *args;
{
- if (!getnoarg())
+ if (!getnoarg(args))
return NULL;
return newintobject((long)getpid());
}
static object *
+posix_getpgrp(self, args)
+ object *self;
+ object *args;
+{
+ if (!getnoarg(args))
+ return NULL;
+ return newintobject((long)getpgrp());
+}
+
+static object *
posix_getppid(self, args)
object *self;
object *args;
{
- if (!getnoarg())
+ if (!getnoarg(args))
return NULL;
return newintobject((long)getppid());
}
@@ -662,6 +672,7 @@ static struct methodlist posix_methods[] = {
{"exec", posix_exec},
{"fork", posix_fork},
{"getpid", posix_getpid},
+ {"getpgrp", posix_getpgrp},
{"getppid", posix_getppid},
{"kill", posix_kill},
{"popen", posix_popen},