sessionclean: Proper killing of ssh-agent
parent
74d7fc70c1
commit
b11982a738
|
@ -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 '())
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue