init: send term/kill signals as final step of shutdown
This commit is contained in:
parent
5fd3747b19
commit
0e3f872098
@ -96,6 +96,11 @@ static void handle_shutdown(const char *runlevel, int cmd)
|
||||
|
||||
pid = do_openrc(runlevel);
|
||||
while (waitpid(pid, NULL, 0) != pid);
|
||||
printf("Sending the final term signal\n");
|
||||
kill(-1, SIGTERM);
|
||||
sleep(3);
|
||||
printf("Sending the final kill signal\n");
|
||||
kill(-1, SIGKILL);
|
||||
sync();
|
||||
reboot(cmd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user