summaryrefslogtreecommitdiff
path: root/userland/sh/sh.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-07-01 16:21:43 +0200
committerAnton Kling <anton@kling.gg>2024-07-01 16:21:43 +0200
commit326cedcca7050ec0b143ff3d2ad94839f77ab22e (patch)
tree0fbcfdc18b0da5ba2cccb3950edf1ef906e9af5b /userland/sh/sh.c
parentab09d1f56f5881eb5d2234038d9146f74deecc10 (diff)
LibC: Change how kill() works
Diffstat (limited to 'userland/sh/sh.c')
-rw-r--r--userland/sh/sh.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/userland/sh/sh.c b/userland/sh/sh.c
index e386ef6..e7741aa 100644
--- a/userland/sh/sh.c
+++ b/userland/sh/sh.c
@@ -49,9 +49,7 @@ void remove_child_process(int pid) {
void slaugther_children(void) {
struct child_process *child = children;
for (; child; child = child->next) {
- int fd = open_process(child->pid);
- kill(fd, SIGTERM);
- close(fd);
+ kill(child->pid, SIGTERM);
}
}