callisto/man/process/process.pidof.3lua.scd
Jeremy Baxter 37d208a5d2 process(3lua): init man pages
Initialise man pages for the process module.
2024-04-06 19:58:41 +13:00

27 lines
593 B
Markdown

PROCESS.PIDOF(3lua) "3lua" "Callisto manual pages"
# NAME
*process.pidof* - get the PID of another process
# SYNOPSIS
*process.pidof*(_cmd_: *string*)
# DESCRIPTION
*process.pidof* returns the PID of a process
which has the command name _cmd_.
The process is chosen arbitrarily; if there are multiple matches,
the first process found with the command name _cmd_ is returned.
If a process could not be found, *process.pidof* returns nil.
# EXAMPLES
Flawed implementation of *process.pid*:
```
function pid()
return process.pidof("csto")
end
```
# SEE ALSO
callisto(3lua), process(3lua)