summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-12 09:31:51 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-12 09:31:51 -0800
commit5173409c3325717f2306d03fec79059efe14e566 (patch)
tree02e4a32f558ffe57b877090d50e845b293bc9d0b /lib
parentb97ce22691e1ffb34f2bc3638ea44a69baa052e4 (diff)
downloadvyatta-cfg-system-5173409c3325717f2306d03fec79059efe14e566.tar.gz
vyatta-cfg-system-5173409c3325717f2306d03fec79059efe14e566.zip
Force user process to die
Bug 5067 Use more persuasive kill to make processes exit, which allows user to be deleted.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Login/User.pm4
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";