diff options
author | dzwdz | 2023-01-08 21:14:03 +0100 |
---|---|---|
committer | dzwdz | 2023-01-08 21:14:03 +0100 |
commit | c178ab5d5ca328d5b0072d54e3dc66d1b198df7b (patch) | |
tree | 0f9e3da6fc6133ab4bab052661bf8903e354d804 /src/kernel/proc.h | |
parent | 5defe97cc8b870fa50ba01999f80974b8b21c5b5 (diff) |
kernel: let parents kill their children again
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r-- | src/kernel/proc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h index 135baad..fa50520 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -9,6 +9,7 @@ struct vfs_mount; /* legal transitions described by process_transition */ enum process_state { PS_RUNNING, + PS_DYING, /* during process_kill - mostly treated as alive */ PS_TOREAP, /* return message not collected */ PS_TOMBSTONE, /* fully dead, supports alive children */ @@ -85,7 +86,10 @@ struct process *process_seed(void *data, size_t datalen); struct process *process_fork(struct process *parent, int flags); void process_kill(struct process *proc, int ret); -/** Tries to reap a dead process / free a tombstone. */ +/** Kills all descendants. */ +void process_filicide(struct process *proc, int ret); +/** Tries to reap a dead process / free a tombstone. + * Can also free all dead parents of *dead. Be careful. */ void process_tryreap(struct process *dead); /** Switches execution to any running process. */ |