mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-27 13:30:48 +00:00
policycoreutils: sandbox: trap sigterm to make sure sandbox exits with the proper exit code
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
83e6416bca
commit
37644bfa93
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
trap "" TERM
|
||||
context=`id -Z | secon -t -l -P`
|
||||
export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
|
||||
[ -z $1 ] && export SCREENSIZE="1000x700" || export SCREENSIZE="$1"
|
||||
@ -14,7 +15,7 @@ __EOF
|
||||
chmod +x ~/seremote
|
||||
/usr/share/sandbox/start $HOME/.sandboxrc
|
||||
export EXITCODE=$?
|
||||
kill -HUP 0
|
||||
kill -TERM 0
|
||||
break
|
||||
done
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user