From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5404 invoked by alias); 12 Dec 2008 20:01:03 -0000 Received: (qmail 5254 invoked by uid 22791); 12 Dec 2008 20:01:02 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Dec 2008 20:00:27 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id mBCK0OFS014450 for ; Fri, 12 Dec 2008 12:00:24 -0800 Received: from localhost (ruffy.corp.google.com [172.18.118.116]) by wpaz5.hot.corp.google.com with ESMTP id mBCK0MLr021095 for ; Fri, 12 Dec 2008 12:00:23 -0800 Received: by localhost (Postfix, from userid 67641) id A4E261C7A0E; Fri, 12 Dec 2008 12:00:22 -0800 (PST) To: gdb-patches@sourceware.org Subject: [RFA] linux-low.c (handle_extended_wait): Simplify, use my_waitpid. Message-Id: <20081212200022.A4E261C7A0E@localhost> Date: Fri, 12 Dec 2008 20:01:00 -0000 From: dje@google.com (Doug Evans) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00234.txt.bz2 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 * 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");