]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Shell: try disown instead of nohup
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 11 Jun 2018 17:13:40 +0000 (14:13 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 11 Jun 2018 17:13:40 +0000 (14:13 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 2faf6c6af369ca0e7a0a1b4676fd4564964cce50..35944c71c487424c144a7aa49ce7cb8bafd33d83 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1736,12 +1736,20 @@ function kvmx_shell {
           echo "Running in restricted shell mode."
           echo "Allowed commands are only `echo $restricted_actions | tr ':' ' '`"
         else
-          # Process command
-          nohup $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
+          # Process command, nohup version, stdout and stderr are redirected to a file
+          #nohup $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
+
+          # Process command, disown version, stdout are preserved
+          $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} &
+          disown
         fi
       else
-        # Process command
+        # Process command, nohup version
         nohup $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1}
+
+        # Process command, disown version
+        $APP_BASE/kvmx ${STDIN[0]} $VM ${STDIN[@]:1} &
+        disown
       fi
     fi
   done