summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-21 23:38:47 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-21 23:38:47 +0200
commita2b3258dbe82b4ee3254190452a3cd429417a0e1 (patch)
tree8550efea9debaa0feac9d7b82a85563a85a7562b
parentc805cb865d7f8e23f88f86219427151bc8df5685 (diff)
downloadwatch-bz-a2b3258dbe82b4ee3254190452a3cd429417a0e1.tar.gz
watch-bz-a2b3258dbe82b4ee3254190452a3cd429417a0e1.tar.xz
watch-bz-a2b3258dbe82b4ee3254190452a3cd429417a0e1.zip
Remove cookie file on shell exit rather than interrupt
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-xwatch-bz4
1 files changed, 2 insertions, 2 deletions
diff --git a/watch-bz b/watch-bz
index 022f54e..da6d0c4 100755
--- a/watch-bz
+++ b/watch-bz
@@ -101,7 +101,7 @@ do_init_login () {
"while [ ! -f \"${BUGZILLA_COOKIE}\" ]; do \
sleep 1; \
done" \
- && echo "wow, cookie emerged"
+ && echo " entering..."
kill -USR1 -$$
} & read -s -p 'Password (1 min timeout): ' BZPASSWORD \
|| return $?
@@ -136,7 +136,7 @@ do_init_login () {
# exclusively using globals
do_init () {
# C-c handler to optionally remove cookie on exit
- test $BUGZILLA_LOGOUT -ne 0 && trap do_logout INT
+ test $BUGZILLA_LOGOUT -ne 0 && trap do_logout 0
# login when appropriate
if [ -n "$BZUSER" ] && [ ! -f "${BUGZILLA_COOKIE}" ]; then