/* Serial interface for local (hardwired) serial ports on Un*x like systems
- Copyright (C) 1992-2018 Free Software Foundation, Inc.
+ Copyright (C) 1992-2019 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
{
#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)
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);
}