mirror of https://github.com/ArduPilot/ardupilot
SITL: encourage bash to create a subshell when spawning ardupilot
This issue is evident in Vagrant if you don't forward X. _fdm_input_step determined there was no parent and killed ArduPilot. Closed #3249
This commit is contained in:
parent
eb73a2b0c9
commit
2c78b4f537
|
@ -21,6 +21,9 @@ else
|
|||
echo "Window access not found, logging to $filename"
|
||||
cmd="$1"
|
||||
shift
|
||||
( $cmd $* &>$filename < /dev/null ) &
|
||||
# the following "true" is to avoid bash optimising the following call
|
||||
# to avoid creating a subshell. We need that subshell, or
|
||||
# _fdm_input_step sees ArduPilot has no parent and kills ArduPilot!
|
||||
( : ; $cmd $* &>$filename < /dev/null ) &
|
||||
fi
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue