Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
@ 2008-12-12 20:01 Doug Evans
  2008-12-12 20:46 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2008-12-12 20:01 UTC (permalink / raw)
  To: gdb-patches

Hi.

Minor bit of cleanup.  Ok to check in?

BTW, there are other calls to waitpid in linux-low.c that don't go through
my_waitpid.  Should they use my_waitpid too?

2008-12-12  Doug Evans  <dje@google.com>

	* linux-low.c (handle_extended_wait): Simplify, use my_waitpid.

Index: linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.82
diff -u -p -r1.82 linux-low.c
--- linux-low.c	2 Dec 2008 07:57:37 -0000	1.82
+++ linux-low.c	12 Dec 2008 19:57:51 -0000
@@ -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_inf
 	  /* 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");


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-12 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-12 20:01 [RFA] linux-low.c (handle_extended_wait): Simplify, use my_waitpid Doug Evans
2008-12-12 20:46 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox