aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-12-12 23:13:20 +0000
committerDoug Evans <dje@google.com>2008-12-12 23:13:20 +0000
commit97438e3f624ad5dd2155cf68ecb7735bf11dc81f (patch)
treee0acab85355ce552f38b49b81da13aa34e06992e /gdb/gdbserver
parentfad6eecd5d0bbccca6db96c20589a0bda9aeca48 (diff)
downloadgdb-97438e3f624ad5dd2155cf68ecb7735bf11dc81f.zip
gdb-97438e3f624ad5dd2155cf68ecb7735bf11dc81f.tar.gz
gdb-97438e3f624ad5dd2155cf68ecb7735bf11dc81f.tar.bz2
* linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/linux-low.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7deafac..3eecdd0 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-12 Doug Evans <dje@google.com>
+
+ * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
+
2008-12-09 Doug Evans <dje@google.com>
* linux-low.h (struct process_info): Delete member tid, unused.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index a518217..4a6acd8 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -121,6 +121,7 @@ static void stop_all_processes (void);
static int linux_wait_for_event (struct thread_info *child);
static int check_removed_breakpoint (struct process_info *event_child);
static void *add_process (unsigned long pid);
+static int my_waitpid (int pid, int *status, int flags);
struct pending_signals
{
@@ -161,9 +162,7 @@ handle_extended_wait (struct process_info *event_child, int wstat)
/* The new child has a pending SIGSTOP. We can't affect it until it
hits the SIGSTOP, but we're already attached. */
- do {
- ret = waitpid (new_pid, &status, __WALL);
- } while (ret == -1 && errno == EINTR);
+ ret = my_waitpid (new_pid, &status, __WALL);
if (ret == -1)
perror_with_name ("waiting for new child");