]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix for using named pipes on Windows
authorGuillaume LABARTHE <guillaume.labarthe@gmail.com>
Thu, 18 Jul 2019 16:20:04 +0000 (17:20 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 Jul 2019 16:20:04 +0000 (17:20 +0100)
commitafe09f0b6311a4dd1a7e2dc6491550bb228734f8
tree6e1ac0fdefe6e6c7664e2f29fdf300238f725db7
parentcd215b2eb74c179d936a3b28577753a08de1cf83
Fix for using named pipes on Windows

On Windows, passing a named pipe as terminal argument to the new-ui
command does not work.

The problem is that the new_ui_command function in top.c opens the
same tty three times, for stdin, stdout and stderr.  With Windows
named pipes, the second and third calls to open fail.

Opening the file only once and passing the same stream for stdin,
stdout and stderr makes it work.

Pedro says:

 I tried it on GNU/Linux and things still work.
 I ran all the MI tests with forced new-ui, with:

 $ make check TESTS="gdb.mi/*.exp" RUNTESTFLAGS="FORCE_MI_SEPARATE_UI=1"

 and saw no regressions.

gdb/ChangeLog:
2019-07-18  Guillaume LABARTHE  <guillaume.labarthe@gmail.com>

* top.c (new_ui_command): Open specified terminal just once.
gdb/ChangeLog
gdb/top.c