From 1cca7389cd48cd7c850091849ee1fd2361836473 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 2 Jun 2002 20:20:41 +0000 Subject: [PATCH] send SIGTERM to all smbd processes not just the parent. --- packaging/RedHat/smb.init | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init index 5419b2b9c6e..8f5c9199e60 100755 --- a/packaging/RedHat/smb.init +++ b/packaging/RedHat/smb.init @@ -32,7 +32,15 @@ case "$1" in ;; stop) echo -n "Shutting down SMB services: " - killproc smbd -TERM + + ## we have to get all the smbd process here instead of just the + ## main parent (i.e. killproc) because it can take a long time + ## for an individual process to process a TERM signal + smbdpids=`ps guax | grep smbd | grep -v grep | awk '{print $2}'` + for pid in $smbdpids; do + kill -TERM $pid + done + ## nmbd and winbindd are ok to kill using killproc() killproc nmbd -TERM if [ "`ps -ef | grep winbind | grep -v grep`" ]; then killproc winbindd -- 2.11.4.GIT