diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2013-05-21 23:38:47 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2013-05-21 23:38:47 +0200 |
commit | a2b3258dbe82b4ee3254190452a3cd429417a0e1 (patch) | |
tree | 8550efea9debaa0feac9d7b82a85563a85a7562b | |
parent | c805cb865d7f8e23f88f86219427151bc8df5685 (diff) | |
download | watch-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-x | watch-bz | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |