(create_process): Use SETUP_SLAVE_PTY only if pty_flag.