PatchworkOS
19e446b
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/fs.h
>
2
#include <
sys/proc.h
>
3
4
uint64_t
kill
(
pid_t
pid)
5
{
6
return
writefiles
(
F
(
"/proc/%llu/ctl"
, pid),
"kill"
);
7
}
writefiles
size_t writefiles(const char *path, const char *string)
Wrapper for writing a null-terminated string directly to a file using a path.
Definition
swritefile.c:4
F
#define F(format,...)
Allocates a formatted string on the stack.
Definition
fs.h:67
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
fs.h
proc.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
src
libstd
user
functions
proc
kill.c
Generated on Sat Jan 24 2026 10:59:25 for PatchworkOS by
1.9.8