Skip to content

Commit

Permalink
Add exit code handling from commander, when running selected exec pro…
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
DarkCaster committed Jan 10, 2018
1 parent b60a747 commit e7e61db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sandboxer/includes/run-profile.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ wait_for_cmd_list
#run
if [[ $exec_bg != true ]]; then
"$commander" "$basedir/control" "$channel" "${cfg[sandbox.setup.security_key]}" "${cfg[$exec_profile.start_opcode]}" "$exec_log_out" "$exec_log_err"
exec_code="$?"
else
&>/dev/null "$commander" "$basedir/control" "$channel" "${cfg[sandbox.setup.security_key]}" "${cfg[$exec_profile.start_opcode]}" "$exec_log_out" "$exec_log_err" &
exec_bg_pid="$!"
exec_code=""
fi

exec_bg=""
Expand Down
2 changes: 2 additions & 0 deletions Sandboxer/sandboxer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,5 @@ log "running exec-profile $profile, using control channel $channel"

#start selected exec profile
. "$includes_dir/run-profile.sh.in"

[[ -z $exec_code ]] || exit $exec_code

0 comments on commit e7e61db

Please sign in to comment.