This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/obvious] Include <signal.h> on gdbserver/fork-child.c (and fix regressions)
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Fri, 9 Jun 2017 18:19:26 -0400
- Subject: [commit/obvious] Include <signal.h> on gdbserver/fork-child.c (and fix regressions)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3B6AF811A7
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3B6AF811A7
- References: <86tw3qa0vd.fsf@gmail.com>
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 | 4 ++++
gdb/gdbserver/fork-child.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a5effe2..80240ff 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -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
diff --git a/gdb/gdbserver/fork-child.c b/gdb/gdbserver/fork-child.c
index a1a8ff1..1002620 100644
--- a/gdb/gdbserver/fork-child.c
+++ b/gdb/gdbserver/fork-child.c
@@ -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. */
--
2.9.3