mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
kvm tool: Exit init only when /bin/sh itself stops
Right now we wait for any of the children to stop, which means we might exit before /bin/sh stopped. Instead, wait only for the /bin/sh (or the sandboxed) process. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
run_process("/bin/sh");
|
||||
} else {
|
||||
wait(&status);
|
||||
waitpid(child, &status, 0);
|
||||
}
|
||||
|
||||
reboot(LINUX_REBOOT_CMD_RESTART);
|
||||
|
||||
Reference in New Issue
Block a user