From 558828c4eba4688740ecc7476cf6ef73e2c1ae67 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 11 Jun 2018 14:13:40 -0300 Subject: Shell: try disown instead of nohup --- kvmx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'kvmx') diff --git a/kvmx b/kvmx index 2faf6c6..35944c7 100755 --- 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 -- cgit v1.2.3