summaryrefslogtreecommitdiff
path: root/userland/sh/sh.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-02 09:17:06 +0200
committerAnton Kling <anton@kling.gg>2024-04-02 09:39:03 +0200
commit2229fd91f7230ae7068814ae029b733945852eb1 (patch)
tree416487f8c66c389c57dee465f648362ca59b8f23 /userland/sh/sh.c
parent7eceb43433634ee253507208baf1d8298b40e377 (diff)
Kernel: Fix some memory leaks
Diffstat (limited to 'userland/sh/sh.c')
-rw-r--r--userland/sh/sh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/userland/sh/sh.c b/userland/sh/sh.c
index e7741aa..e386ef6 100644
--- a/userland/sh/sh.c
+++ b/userland/sh/sh.c
@@ -49,7 +49,9 @@ void remove_child_process(int pid) {
void slaugther_children(void) {
struct child_process *child = children;
for (; child; child = child->next) {
- kill(child->pid, SIGTERM);
+ int fd = open_process(child->pid);
+ kill(fd, SIGTERM);
+ close(fd);
}
}