webbuild-functions: fix killtree function to avoid killing http server
This commit is contained in:
parent
d73319d4ea
commit
9ab269e0f7
@ -176,7 +176,8 @@ function kill_tree() {
|
|||||||
|
|
||||||
[ $1 ] || return
|
[ $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 $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user