diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-12 09:31:51 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-12 09:31:51 -0800 |
commit | 5173409c3325717f2306d03fec79059efe14e566 (patch) | |
tree | 02e4a32f558ffe57b877090d50e845b293bc9d0b | |
parent | b97ce22691e1ffb34f2bc3638ea44a69baa052e4 (diff) | |
download | vyatta-cfg-quagga-5173409c3325717f2306d03fec79059efe14e566.tar.gz vyatta-cfg-quagga-5173409c3325717f2306d03fec79059efe14e566.zip |
Force user process to die
Bug 5067
Use more persuasive kill to make processes exit, which
allows user to be deleted.
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index e4909b9a..a65e5cb1 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -110,7 +110,9 @@ sub _delete_user { die "Attempting to delete current user: $user\n"; } else { # This logs out user (so we can delete it) - system("pkill -u $user"); + system("pkill -HUP -U $user"); + sleep(1); + system("pkill -9 -U $user"); system("userdel $user") == 0 or die "userdel of $user failed: $?\n"; |