wake up init when it is receiving new children

This commit is contained in:
Kevin Lange 2017-01-20 14:49:48 +09:00
parent 7a9718be37
commit 34c24e5275

View File

@ -185,10 +185,16 @@ void delete_process(process_t * proc) {
/* Remove the entry. */
spin_lock(tree_lock);
/* Reparent everyone below me to init */
int has_children = entry->children->length;
tree_remove_reparent_root(process_tree, entry);
list_delete(process_list, list_find(process_list, proc));
spin_unlock(tree_lock);
if (has_children) {
process_t * init = process_tree->root->value;
wakeup_queue(init->wait_queue);
}
bitset_clear(&pid_set, proc->id);
/* Uh... */