Add shutdown logic for intermediate supervisor stem process

To kill/wait on the supervised leaf nodes before exiting.
This commit is contained in:
Jon Siwek 2019-10-18 14:10:31 -07:00
parent 0180d47c5a
commit 2bc533f762
2 changed files with 100 additions and 7 deletions

View file

@ -792,7 +792,10 @@ int main(int argc, char** argv)
// TODO: this re-parenting check needs to go somewhere proper
if ( getppid() == 1 )
exit(0);
{
printf("node suicide: %s\n", stem_spawn.data());
exit(13);
}
}
}