From: Guido van Rossum Date: Tue, 4 Jun 1991 20:23:49 +0000 (+0000) Subject: Added getpgrp(); fixed buggy calls to getnoarg(). X-Git-Tag: v0.9.8~910 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0481447f4135c11d42ae25f55696af8e8d52fe74;p=thirdparty%2FPython%2Fcpython.git Added getpgrp(); fixed buggy calls to getnoarg(). --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 3a1d4ba55072..9af13b957d17 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},