PatchworkOS
10941b4
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
kill.c
Go to the documentation of this file.
1
#include <
sys/io.h
>
2
#include <
sys/proc.h
>
3
4
uint64_t
kill
(
pid_t
pid)
5
{
6
return
swritefile
(
F
(
"/proc/%llu/ctl"
, pid),
"kill"
);
7
}
F
#define F(format,...)
Allocates a formatted string on the stack.
Definition
io.h:66
swritefile
size_t swritefile(const char *path, const char *string)
Wrapper for writing a null-terminated string directly to a file using a path.
Definition
swritefile.c:4
kill
uint64_t kill(pid_t pid)
Helper for sending the "kill" command to a process.
Definition
kill.c:4
pid_t
__UINT64_TYPE__ pid_t
Process Identifier.
Definition
pid_t.h:11
io.h
proc.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
src
libstd
user
functions
proc
kill.c
Generated on Fri Jan 9 2026 06:47:13 for PatchworkOS by
1.9.8