Skip to content

Commit 2a3bcc5

Browse files
committed
os: add setpgid()
1 parent 6b9b09c commit 2a3bcc5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

os/os/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
execvp_ = libc.func("i", "execvp", "PP")
6161
kill_ = libc.func("i", "kill", "ii")
6262
getenv_ = libc.func("s", "getenv", "P")
63+
setpgid_ = libc.func("i", "setpgid", "ii")
6364

6465

6566

@@ -237,6 +238,11 @@ def kill(pid, sig):
237238
r = kill_(pid, sig)
238239
check_error(r)
239240

241+
def setpgid(pid, pgid):
242+
r = setpgid_(pid, pgid)
243+
check_error(r)
244+
return r
245+
240246
def system(command):
241247
r = system_(command)
242248
check_error(r)

0 commit comments

Comments
 (0)