kvm tool: Exit init only when /bin/sh itself stops
PATCH 1/1 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 <[email protected]>
--- tools/kvm/guest/init_stage2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/kvm/guest/init_stage2.c +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 );
Signature · 1 line
1.7.8.1