uce/site/doc/pages/task_kill.txt

26 lines
742 B
Plaintext

:sig
int task_kill(pid_t pid, int sig = 0)
:params
pid : PID of the process
sig : signal number
return value : 0 if signal was sent, -1 otherwise
:see
>task
task
task_pid
task_repeat
:content
Wraps the standard POSIX `kill()` function.
`sig` may be any supported POSIX signal, including values such as `SIGTERM`, `SIGKILL`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGCHLD`, `SIGCONT`, and related process-control signals.
Passing `0` as the signal performs an existence and permission check without actually delivering a signal.
Related:
- PHP: background-process patterns using `proc_open()`, queues, cron, or worker supervisors
- JavaScript / Node.js: Node `child_process`, worker queues, timers, schedulers, and supervised background jobs