thread_change_ptid (pid_to_ptid (pid),
ptid_build (pid, lwpid, 0));
- startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
+ gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
#ifdef SYS_syssgi
/* On mips-irix, we need to stop the inferior early enough during
pid = fork_inferior (exec_file, allargs, env, procfs_set_exec_trap,
NULL, NULL, shell_file, NULL);
+ /* We have something that executes now. We'll be running through
+ the shell at this point (if startup-with-shell is true), but the
+ pid shouldn't change. */
+ add_thread_silent (pid_to_ptid (pid));
+
procfs_init_inferior (ops, pid);
}