Blame 0020-console-notifications-use-return-instead-of-exit.patch

0b651cb
From a8f12ee8aa40d9ff05004bf6661ab442ad161202 Mon Sep 17 00:00:00 2001
0b651cb
From: Jakub Filak <jfilak@redhat.com>
0b651cb
Date: Thu, 9 Oct 2014 16:28:12 +0200
0b651cb
Subject: [PATCH] console-notifications: use return instead of exit
0b651cb
0b651cb
Thanks Ray Strode [halfline] <rstrode@redhat.com>
0b651cb
0b651cb
Related to rhbz#1150169
0b651cb
0b651cb
Signed-off-by: Jakub Filak <jfilak@redhat.com>
0b651cb
---
0b651cb
 src/cli/abrt-console-notification.sh | 10 +++++-----
0b651cb
 1 file changed, 5 insertions(+), 5 deletions(-)
0b651cb
0b651cb
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
0b651cb
index 849273c..38de7bb 100755
0b651cb
--- a/src/cli/abrt-console-notification.sh
0b651cb
+++ b/src/cli/abrt-console-notification.sh
0b651cb
@@ -1,13 +1,13 @@
0b651cb
-# If shell is not connect to a terminal, exit immediately, because this script
0b651cb
+# If shell is not connect to a terminal, return immediately, because this script
0b651cb
 # should print out ABRT's status and it is senseless to continue without
0b651cb
 # terminal.
0b651cb
-tty -s || exit 0
0b651cb
+tty -s || return 0
0b651cb
 
0b651cb
 # If $HOME is not set, a non human user is logging in to shell but this script
0b651cb
-# should provide information to human users, therefore exiting immediately
0b651cb
+# should provide information to human users, therefore returning immediately
0b651cb
 # without showing the notification.
0b651cb
 if [ -z "$HOME" ]; then
0b651cb
-    exit 0
0b651cb
+    return 0
0b651cb
 fi
0b651cb
 
0b651cb
 if [ -z "$ABRT_DEBUG_LOG" ]; then
0b651cb
@@ -19,7 +19,7 @@ SINCEFILE="$LPATHDIR/lastnotification"
0b651cb
 
0b651cb
 if [ ! -f "$LPATHDIR" ]; then
0b651cb
     # It might happen that user doesn't have write access on his home.
0b651cb
-    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || exit 0
0b651cb
+    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || return 0
0b651cb
 fi
0b651cb
 
0b651cb
 TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
0b651cb
-- 
0b651cb
1.9.3
0b651cb