avoid interaction with PID1
This commit is contained in:
parent
04b31f7a24
commit
a312de64e1
@ -10,6 +10,8 @@ function {
|
|||||||
i=$(ps -o ppid= -p $i 2>/dev/null || : )
|
i=$(ps -o ppid= -p $i 2>/dev/null || : )
|
||||||
i=${i//[^0-9]}
|
i=${i//[^0-9]}
|
||||||
[[ "$i" =~ '^[1-9][0-9]*$' ]] || break
|
[[ "$i" =~ '^[1-9][0-9]*$' ]] || break
|
||||||
|
## don't deal with PID1
|
||||||
|
[ "$i" = 1 ] && continue
|
||||||
ZSHU_PARENTS_PID+=( $i )
|
ZSHU_PARENTS_PID+=( $i )
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user