[Libguestfs] [PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
Richard W.M. Jones
rjones at redhat.com
Thu Sep 26 16:40:29 UTC 2019
If the user calls nbd_kill_subprocess, we shouldn't kill the process
again when we close the handle (since the process has likely gone and
we might be killing a different process).
---
lib/handle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/handle.c b/lib/handle.c
index 2af25fe..5ad818e 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -315,6 +315,8 @@ nbd_unlocked_kill_subprocess (struct nbd_handle *h, int signum)
return -1;
}
+ h->pid = -1;
+
return 0;
}
--
2.23.0
More information about the Libguestfs
mailing list