summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/lynx-low.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-08-28 17:40:58 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-08-28 17:40:58 +0000
commit602e3198bc03297b7d9cb34ed3838272254eba1f (patch)
tree01af773a194c74db87c4f7c19380b8e5bd53097f /gdb/gdbserver/lynx-low.c
parent7893c1628865061e2a2fb1ba84103ca18a44f0fa (diff)
downloadbinutils-gdb-602e3198bc03297b7d9cb34ed3838272254eba1f.tar.gz
PR server/15604
gdb/gdbserver/ 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com> PR server/15604 * linux-low.c: Include filestuff.h. (linux_create_inferior) <pid == 0>: Call close_most_fds. * lynx-low.c: Include filestuff.h. (lynx_create_inferior) <pid == 0>: Call close_most_fds. * server.c: Include filestuff.h. (main): Call notice_open_fds. * spu-low.c: Include filestuff.h. (spu_create_inferior) <pid == 0>: Call close_most_fds.
Diffstat (limited to 'gdb/gdbserver/lynx-low.c')
-rw-r--r--gdb/gdbserver/lynx-low.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c
index 4cf86837f3f..3c75b6296b8 100644
--- a/gdb/gdbserver/lynx-low.c
+++ b/gdb/gdbserver/lynx-low.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include "gdb_wait.h"
#include <signal.h>
+#include "filestuff.h"
int using_threads = 1;
@@ -240,6 +241,8 @@ lynx_create_inferior (char *program, char **allargs)
{
int pgrp;
+ close_most_fds ();
+
/* Switch child to its own process group so that signals won't
directly affect gdbserver. */
pgrp = getpid();