gdb/testsuite/tui: Always dump_screen when asked
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index de4c936f14c37a41612d51e42e2531377d87acc0..df6bc4c7c4ceed57adb4fc109115030509a8bc8c 100644 (file)
@@ -1,6 +1,6 @@
 /* Serial interface for local (hardwired) serial ports on Un*x like systems
 
-   Copyright (C) 1992-2019 Free Software Foundation, Inc.
+   Copyright (C) 1992-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include <sys/types.h>
 #include "terminal.h"
 #include <sys/socket.h>
-#include "gdb_sys_time.h"
+#include "gdbsupport/gdb_sys_time.h"
 
 #include "gdb_select.h"
 #include "gdbcmd.h"
-#include "filestuff.h"
+#include "gdbsupport/filestuff.h"
 #include <termios.h>
+#include "inflow.h"
 
 struct hardwire_ttystate
   {
@@ -40,7 +41,7 @@ struct hardwire_ttystate
 
 #ifdef CRTSCTS
 /* Boolean to explicitly enable or disable h/w flow control.  */
-static int serial_hwflow;
+static bool serial_hwflow;
 static void
 show_serial_hwflow (struct ui_file *file, int from_tty,
                    struct cmd_list_element *c, const char *value)
@@ -164,6 +165,9 @@ hardwire_print_tty_state (struct serial *scb,
 static int
 hardwire_drain_output (struct serial *scb)
 {
+  /* Ignore SIGTTOU which may occur during the drain.  */
+  scoped_ignore_sigttou ignore_sigttou;
+
   return tcdrain (scb->fd);
 }
 
This page took 0.025691 seconds and 4 git commands to generate.