From 5173409c3325717f2306d03fec79059efe14e566 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 12 Mar 2010 09:31:51 -0800 Subject: Force user process to die Bug 5067 Use more persuasive kill to make processes exit, which allows user to be deleted. --- lib/Vyatta/Login/User.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Vyatta') 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"; -- cgit v1.2.3