[pve-devel] [PATCH v4 1/3] migrate: collect migration tunnel child process

Dietmar Maurer dietmar at proxmox.com
Thu Jun 2 17:06:19 CEST 2016


> I can see the reason to use waitpid instead of check_process_running(),
> but why do you change the rest of the code?
> 
> Can we have minimal patches, where each patch states the reason for the change
> in the commit log?

I thought about something like this:

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index a25efff..ce5774e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -71,6 +71,8 @@ sub finish_command_pipe {
     $self->log('info', "ssh tunnel still running - terminating now with
SIGKILL\n");
     kill 9, $cpid;
     sleep 1;
+
+    waitpid($cpid); # avoid zombies
 }

 sub fork_tunnel {



More information about the pve-devel mailing list