]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Better process check at kvmx_running
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 22 Sep 2017 14:09:59 +0000 (11:09 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 22 Sep 2017 14:09:59 +0000 (11:09 -0300)
kvmx

diff --git a/kvmx b/kvmx
index d52cc8a3c677ab117e97e7e3efe909911466eb31..ae554bb7c35811ca05720698f45c6cb47f953c02 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -519,7 +519,11 @@ function kvmx_running {
     return 1
   fi
 
-  ps $PID &> /dev/null
+  # Simpler check
+  #ps $PID &> /dev/null
+
+  # Better check were process should match a qemu binary
+  ps -o command $PID | grep -q '^qemu'
 
   return $?
 }