kopia lustrzana https://github.com/micropython/micropython-lib
os: Implement kill().
rodzic
2b616b11e3
commit
d7bdde8820
|
@ -52,6 +52,7 @@ getpid_ = libc.func("i", "getpid", "")
|
||||||
waitpid_ = libc.func("i", "waitpid", "ipi")
|
waitpid_ = libc.func("i", "waitpid", "ipi")
|
||||||
system_ = libc.func("i", "system", "s")
|
system_ = libc.func("i", "system", "s")
|
||||||
execvp_ = libc.func("i", "execvp", "PP")
|
execvp_ = libc.func("i", "execvp", "PP")
|
||||||
|
kill_ = libc.func("i", "kill", "ii")
|
||||||
getenv_ = libc.func("s", "getenv", "P")
|
getenv_ = libc.func("s", "getenv", "P")
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,6 +216,10 @@ def waitpid(pid, opts):
|
||||||
check_error(r)
|
check_error(r)
|
||||||
return (r, a[0])
|
return (r, a[0])
|
||||||
|
|
||||||
|
def kill(pid, sig):
|
||||||
|
r = kill_(pid, sig)
|
||||||
|
check_error(r)
|
||||||
|
|
||||||
def system(command):
|
def system(command):
|
||||||
r = system_(command)
|
r = system_(command)
|
||||||
check_error(r)
|
check_error(r)
|
||||||
|
|
Ładowanie…
Reference in New Issue