sessionclean: Proper killing of ssh-agent

master
Pierre Neidhardt 2014-03-13 16:25:56 +01:00
parent 74d7fc70c1
commit b11982a738
2 changed files with 5 additions and 10 deletions

View File

@ -90,11 +90,7 @@
(define-abbrev-table 'sgml-mode-abbrev-table '())
(define-abbrev-table 'sh-mode-abbrev-table
'(
("/null" "" sh-redirect-to-null 0)
("null" "" sh-redirect-to-null 2)
))
(define-abbrev-table 'sh-mode-abbrev-table '())
(define-abbrev-table 'shell-mode-abbrev-table '())

View File

@ -11,12 +11,11 @@ EOF
fi
if command -v emacsclient >/dev/null 2>&1; then
if emacsclient -e '(kill-emacs)'; then
if emacsclient -e '(kill-emacs)' >/dev/null 2>&1; then
echo "Emacs terminated." >&2
fi
fi
if [ -n "$SSH_AGENT_PID" ]; then
echo "SSH" >&2
if [ -S "$SSH_AUTH_SOCK" ]; then
echo "SSH agent terminated." >&2
eval "$(ssh-agent -k)"
fi
fi