- new_tty ();
-
- dont_repeat ();
- sprintf (pid_spelling, "%d", child_pid);
- target_require_attach (pid_spelling, 1);
-
- /* Perform any necessary cleanup, after attachment. (This form
- of attaching can behave differently on some targets than the
- standard method, where a process formerly not under debugger
- control was suddenly attached to..)
- */
- target_post_follow_inferior_by_clone ();
-
- *followed_child = 1;
- }
-
- /* Discard the handoff sempahore. */
- (void) close (handoff_semaphore[SEM_LISTEN]);
- (void) close (handoff_semaphore[SEM_TALK]);
-}
-
-/* Accept NTRAPS traps from the inferior. */
-
-void
-startup_inferior (ntraps)
- int ntraps;
-{
- int pending_execs = ntraps;
- int terminal_initted;
-
- /* The process was started by the fork that created it,
- but it will have stopped one instruction after execing the shell.
- Here we must get it up to actual execution of the real program. */
-
- clear_proceed_status ();
-
- init_wait_for_inferior ();
+ switch (ws.kind)
+ {
+ case TARGET_WAITKIND_SPURIOUS:
+ case TARGET_WAITKIND_LOADED:
+ case TARGET_WAITKIND_FORKED:
+ case TARGET_WAITKIND_VFORKED:
+ case TARGET_WAITKIND_SYSCALL_ENTRY:
+ case TARGET_WAITKIND_SYSCALL_RETURN:
+ /* Ignore gracefully during startup of the inferior. */
+ switch_to_thread (event_ptid);
+ break;