* linux-nat.c (linux_nat_terminal_inferior)
[deliverable/binutils-gdb.git] / gdb / target.c
index 8cbde1b91ec673d23a6dc995426e6a9dccbfa343..6dfa73667dada32e3728837d0bd9cb687508105c 100644 (file)
@@ -301,6 +301,18 @@ target_create_inferior (char *exec_file, char *args,
                  "could not find a target to create inferior");
 }
 
+void
+target_terminal_inferior (void)
+{
+  /* A background resume (``run&'') should leave GDB in control of the
+     terminal.  */
+  if (target_is_async_p () && !sync_execution)
+    return;
+
+  /* If GDB is resuming the inferior in the foreground, install
+     inferior's terminal modes.  */
+  (*current_target.to_terminal_inferior) ();
+}
 
 static int
 nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
This page took 0.026743 seconds and 4 git commands to generate.