20 lines
496 B
Plaintext
20 lines
496 B
Plaintext
:sig
|
|
pid_t task_pid(String key)
|
|
|
|
:params
|
|
key : string uniquely identifying the task
|
|
return value : the process ID of the task
|
|
|
|
:see
|
|
>task
|
|
|
|
:content
|
|
Checks whether a process with the given `key` is running and returns its PID if it is.
|
|
|
|
Returns `0` when no matching task is active.
|
|
|
|
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
|