Include <signal.h> on gdbserver/fork-child.c (and fix regressions)
authorSergio Durigan Junior <sergiodj@redhat.com>
Fri, 9 Jun 2017 22:16:19 +0000 (18:16 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Fri, 9 Jun 2017 22:16:19 +0000 (18:16 -0400)
Hi,

This is another obvious patch that fixes a thinko from my previous
startup-with-shell series.  We should conditionally include <signal.h>
on gdb/gdbserver/fork-child.c because gdbserver will be putting the
inferior's terminal on the correct mode after the call to
fork_inferior, and for that it needs to ignore SIGTTOU.

This patch fixes a bunch of regressions happening on AArch64 that were
reported by Yao.

gdb/gdbserver/ChangeLog:
2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>

* fork-child.c: Conditionally include <signal.h>.

gdb/gdbserver/ChangeLog
gdb/gdbserver/fork-child.c

index a5effe2d9c027e2cda10981b8db6e54898f72455..80240ffe388f7f0709142353d4fd127040ef8891 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * fork-child.c: Conditionally include <signal.h>.
+
 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * server.c (handle_general_set): Handle new packet
index a1a8ff11d8b2d5e3b012d1851e146e9a26831172..1002620759be428ac5cf26cc35dbc06a69cee6f4 100644 (file)
@@ -19,6 +19,9 @@
 #include "server.h"
 #include "job-control.h"
 #include "nat/fork-inferior.h"
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
 
 #ifdef SIGTTOU
 /* A file descriptor for the controlling terminal.  */