Modified the process() to return ($pid, $stdin)