const char *in = "", *out = "", *err = "";
int fd, fds[3];
sigset_t set;
- const char *inferior_io_terminal = get_inferior_io_terminal ();
struct inferior *inf;
argv = xmalloc ((allargs.size () / (unsigned) 2 + 2) *
/* If the user specified I/O via gdb's --tty= arg, use it, but only
if the i/o is not also being specified via redirection. */
- if (inferior_io_terminal)
+ const char *inferior_tty = current_inferior ()->tty ();
+ if (inferior_tty != nullptr)
{
if (!in[0])
- in = inferior_io_terminal;
+ in = inferior_tty;
if (!out[0])
- out = inferior_io_terminal;
+ out = inferior_tty;
if (!err[0])
- err = inferior_io_terminal;
+ err = inferior_tty;
}
if (in[0])