def get_children_pids(ppid):
 return system_output(('ps -L --ppid=%d -o lwp' % ppid)).split('\n')[1:]

def get_children_pids ( ppid ) : return system_output ( ( 'ps -L --ppid=%d -o lwp' % ppid ) ) . split ( '\n' ) [ 1 : ]
get all pids of children/threads of parent ppid param ppid: parent pid return: list of pids of all children/threads of ppid .