process: remove documentation comments

This commit is contained in:
Jeremy Baxter 2024-04-06 19:59:09 +13:00
parent 37d208a5d2
commit 1a5a54d808

View file

@ -135,12 +135,6 @@ static const char *sigstrs[] = {
/* clang-format on */ /* clang-format on */
/***
* Returns the PID of the current process.
*
* @function pid
* @usage local pid = process.pid()
*/
static int static int
process_pid(lua_State *L) process_pid(lua_State *L)
{ {
@ -148,19 +142,6 @@ process_pid(lua_State *L)
return 1; return 1;
} }
/***
* Returns the PID (process ID) of the given process,
* or nil if the process could not be found.
*
* Depends on the nonportable userspace utility `pgrep`.
* Can be found in the procps-ng package on Linux usually
* included in most distributions, or as part of the base
* system on OpenBSD, NetBSD and FreeBSD.
*
* @function pidof
* @usage process.pidof("init")
* @tparam string process The name of the process to look up.
*/
static int static int
process_pidof(lua_State *L) process_pidof(lua_State *L)
{ {
@ -220,16 +201,6 @@ strtosig(const char *sig)
return -1; /* invalid signal */ return -1; /* invalid signal */
} }
/***
* Returns the given signal as an integer.
*
* This signal value is a platform-dependent value;
* do not attempt to use it portably across different platforms.
*
* @function signum
* @usage local sigkill = process.signum("SIGKILL")
* @tparam string signal The signal to look up.
*/
static int static int
process_signum(lua_State *L) process_signum(lua_State *L)
{ {
@ -266,19 +237,6 @@ sigsend(lua_State *L, pid_t pid, const char *sigstr)
return lfail(L); return lfail(L);
} }
/***
* Sends the given signal to the process with the given PID.
*
* The *signal* parameter is a string containing the name
* of the desired signal to send (e.g. SIGKILL).
*
* @function send
* @usage
local pid = process.pid("sh")
process.send(pid, "SIGTERM")
* @tparam integer pid The PID of the process.
* @tparam string signal The signal to send.
*/
static int static int
process_send(lua_State *L) process_send(lua_State *L)
{ {
@ -291,14 +249,6 @@ process_send(lua_State *L)
return sigsend(L, pid, sig); return sigsend(L, pid, sig);
} }
/***
* Kills the process with the given PID.
*
* Equivalent to `process.send(pid, "SIGKILL")`.
*
* @function kill
* @tparam integer pid The PID of the process.
*/
static int static int
process_kill(lua_State *L) process_kill(lua_State *L)
{ {
@ -308,14 +258,7 @@ process_kill(lua_State *L)
return sigsend(L, pid, "SIGKILL"); return sigsend(L, pid, "SIGKILL");
} }
/***
* Terminates the process with the given PID.
*
* Equivalent to `process.send(pid, "SIGTERM")`.
*
* @function terminate
* @tparam integer pid The PID of the process.
*/
static int static int
process_terminate(lua_State *L) process_terminate(lua_State *L)
{ {