From 37644bfa936505cbfa9ab9cc20842ccaea89e036 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Wed, 6 Jul 2011 20:52:38 -0400 Subject: [PATCH] policycoreutils: sandbox: trap sigterm to make sure sandbox exits with the proper exit code Acked-by: Dan Walsh --- policycoreutils/sandbox/sandboxX.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/policycoreutils/sandbox/sandboxX.sh b/policycoreutils/sandbox/sandboxX.sh index ec7f8556..88ebfee2 100644 --- a/policycoreutils/sandbox/sandboxX.sh +++ b/policycoreutils/sandbox/sandboxX.sh @@ -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