]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
xinitrc: Kill ssh-agent on logout.
authorSimon Ruderich <simon@ruderich.org>
Mon, 27 May 2013 21:56:24 +0000 (23:56 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 27 May 2013 21:56:24 +0000 (23:56 +0200)
xinitrc

diff --git a/xinitrc b/xinitrc
index 79f3564413d697c2bab5b3fbb2db615ed2662755..162efa4c22d3c2e3ebbb61c4ab7f89b134facd09 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -99,3 +99,11 @@ fi
 
 # Start window manager.
 xmonad
+
+# Cleanup.
+#
+# Kill ssh-agent to prevent unused background processes.
+if test -x /usr/bin/ssh-agent; then
+    /usr/bin/ssh-agent -k >/dev/null
+    # No `eval` necessary, we terminate anyway.
+fi