pid=$(ps -l -p $pid | grep -v PPID | perl -ane 'print $F[4]')