Message: previous - next
Month: February 2014

Notes to commit 77aed4a4

From: Slávek Banko <slavek.banko@...>
Date: Mon, 24 Feb 2014 22:42:56 +0100

I have a note to commit 77aed4a4. I'm afraid that used grep is dangerous. For
example, my colleague has a login name 's' (yes, only one letter). Such grep
would return unwanted results. I propose a change roughly as follows. This
will make it possible to omit some grep and also condition.

ps -u $USER -o pid= -o comm= | grep -w kdesktop_lock | awk '{print $1}' | xargs -r kill -9

The second note is that this killing can be dangerous. If the machine is
configured for multi-user login (multi-seat, xdmcp), the user could have
multiple active sessions. Alternatively, user could have running some
applications remotely - dcopserver would be active for remote session.