/* Low level interface to ptrace, for GDB when running under Unix.
- Copyright (C) 1986-2020 Free Software Foundation, Inc.
+ Copyright (C) 1986-2021 Free Software Foundation, Inc.
This file is part of GDB.
#include <fcntl.h>
#include "gdbsupport/gdb_select.h"
-#include "inflow.h"
#include "gdbcmd.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#include "gdbsupport/job-control.h"
+#include "gdbsupport/scoped_ignore_sigttou.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
systems (SVR4 for example), this may cause a SIGTTOU, so temporarily
ignore SIGTTOU. */
tty = open ("/dev/tty", O_RDWR);
- if (tty > 0)
+ if (tty >= 0)
{
scoped_ignore_sigttou ignore_sigttou;
/* OK, figure out whether we have job control. */
have_job_control ();
- gdb::observers::inferior_exit.attach (inflow_inferior_exit);
+ gdb::observers::inferior_exit.attach (inflow_inferior_exit, "inflow");
}