]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added getpgrp(); fixed buggy calls to getnoarg().
authorGuido van Rossum <guido@python.org>
Tue, 4 Jun 1991 20:23:49 +0000 (20:23 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 4 Jun 1991 20:23:49 +0000 (20:23 +0000)
Modules/posixmodule.c

index 3a1d4ba550721bc398ebed013ebec956942d5d6d..9af13b957d179db9e6d31b4545aeef7403179cd0 100644 (file)
@@ -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},