Kaydet (Commit) 0481447f authored tarafından Guido van Rossum's avatar Guido van Rossum

Added getpgrp(); fixed buggy calls to getnoarg().

üst 065d71e2
...@@ -515,17 +515,27 @@ posix_getpid(self, args) ...@@ -515,17 +515,27 @@ posix_getpid(self, args)
object *self; object *self;
object *args; object *args;
{ {
if (!getnoarg()) if (!getnoarg(args))
return NULL; return NULL;
return newintobject((long)getpid()); 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 * static object *
posix_getppid(self, args) posix_getppid(self, args)
object *self; object *self;
object *args; object *args;
{ {
if (!getnoarg()) if (!getnoarg(args))
return NULL; return NULL;
return newintobject((long)getppid()); return newintobject((long)getppid());
} }
...@@ -662,6 +672,7 @@ static struct methodlist posix_methods[] = { ...@@ -662,6 +672,7 @@ static struct methodlist posix_methods[] = {
{"exec", posix_exec}, {"exec", posix_exec},
{"fork", posix_fork}, {"fork", posix_fork},
{"getpid", posix_getpid}, {"getpid", posix_getpid},
{"getpgrp", posix_getpgrp},
{"getppid", posix_getppid}, {"getppid", posix_getppid},
{"kill", posix_kill}, {"kill", posix_kill},
{"popen", posix_popen}, {"popen", posix_popen},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment