=== modified file 'src/gl-composite-benchmark'
@@ -24,9 +24,9 @@
pids=""
wids=""
-get_first_child_of_pid()
+get_first_sh_child_of_pid()
{
- ps ax -o pid,ppid | awk -v PID=$1 '$2 == PID { print $1; exit }'
+ ps ax -o pid,ppid,comm | awk -v PID=$1 '$2 == PID && $3 == "sh" { print $1; exit }'
}
get_wid_from_pid()
@@ -40,7 +40,7 @@
_child_pid=
while [ -z "$_wid" ]; do
if [ -z "$_child_pid" ]; then
- _child_pid=$(get_first_child_of_pid $1)
+ _child_pid=$(get_first_sh_child_of_pid $1)
fi
if [ -n "$_child_pid" ]; then
_wid=$(get_wid_from_pid $_child_pid)