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

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