diff --git a/webbuild/webbuild-functions b/webbuild/webbuild-functions index 9373eae..8f4df3e 100644 --- a/webbuild/webbuild-functions +++ b/webbuild/webbuild-functions @@ -176,7 +176,8 @@ function kill_tree() { [ $1 ] || return - kill `pstree -p $killpid | sed 's/(/\n(/g' | grep '(' | sed 's/(\(.*\)).*/\1/' | tr "\n" " "` + # tail here is used to avoid killing first pid, typically sh, which causes apache to stop since some time + kill `pstree -pl $killpid | sed 's/(/\n(/g' | grep '(' | sed 's/(\(.*\)).*/\1/' | tail -n+2 | tr "\n" " "` return $? }