Skip to content

Commit d7bdde8

Browse files
committed
os: Implement kill().
1 parent 2b616b1 commit d7bdde8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

os/os/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
waitpid_ = libc.func("i", "waitpid", "ipi")
5353
system_ = libc.func("i", "system", "s")
5454
execvp_ = libc.func("i", "execvp", "PP")
55+
kill_ = libc.func("i", "kill", "ii")
5556
getenv_ = libc.func("s", "getenv", "P")
5657

5758

@@ -215,6 +216,10 @@ def waitpid(pid, opts):
215216
check_error(r)
216217
return (r, a[0])
217218

219+
def kill(pid, sig):
220+
r = kill_(pid, sig)
221+
check_error(r)
222+
218223
def system(command):
219224
r = system_(command)
220225
check_error(r)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy