cleanup, docs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
int task_kill(pid_t pid, int sig = 0)
|
||||
int task_kill(pid_t pid, s32 sig = 0)
|
||||
|
||||
:params
|
||||
pid : PID of the process
|
||||
@@ -22,4 +22,6 @@ Wraps the standard POSIX `kill()` function for positive process IDs.
|
||||
Passing `0` as the signal performs an existence and permission check without actually delivering a signal.
|
||||
|
||||
:example
|
||||
print("task_kill example\n");
|
||||
task("doc-demo-kill", []() { usleep(3000000); });
|
||||
pid_t pid = task_pid("doc-demo-kill");
|
||||
print(pid > 0 && task_kill(pid) == 0 ? "task signalled to stop" : "no task to kill", "\n");
|
||||
|
||||
Reference in New Issue
Block a user