From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19963 invoked by alias); 12 May 2005 21:05:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19537 invoked from network); 12 May 2005 21:05:13 -0000 Received: from unknown (HELO mtagate2.de.ibm.com) (195.212.29.151) by sourceware.org with SMTP; 12 May 2005 21:05:13 -0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.12.10/8.12.10) with ESMTP id j4CL4DSp186638 for ; Thu, 12 May 2005 21:04:13 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4CL3DRM044620 for ; Thu, 12 May 2005 23:03:13 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.13.3) with ESMTP id j4CL3DbO017601 for ; Thu, 12 May 2005 23:03:13 +0200 Received: from 53v30g15.boeblingen.de.ibm.com (53v30g15.boeblingen.de.ibm.com [9.152.26.155]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id j4CL3D4S017598; Thu, 12 May 2005 23:03:13 +0200 Received: from 53v30g15.boeblingen.de.ibm.com (localhost [127.0.0.1]) by 53v30g15.boeblingen.de.ibm.com (8.12.10/8.12.10) with ESMTP id j4CL2uql014284; Thu, 12 May 2005 23:02:56 +0200 Received: (from uweigand@localhost) by 53v30g15.boeblingen.de.ibm.com (8.12.10/8.12.10/Submit) id j4CL2tCS014283; Thu, 12 May 2005 23:02:55 +0200 From: Ulrich Weigand Message-Id: <200505122102.j4CL2tCS014283@53v30g15.boeblingen.de.ibm.com> Subject: Re: [RFA] Fix internal error in wait_lwp (interrupted system call) To: drow@false.org (Daniel Jacobowitz) Date: Thu, 12 May 2005 21:14:00 -0000 Cc: uweigand@de.ibm.com (Ulrich Weigand), gdb-patches@sources.redhat.com In-Reply-To: <20050512191849.GA10326@nevyn.them.org> from "Daniel Jacobowitz" at May 12, 2005 03:18:49 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00311.txt.bz2 Daniel Jacobowitz wrote: > On the one hand, this is very clever. On the other hand, it's not very > robust. This is not the only signal that could arrive. Shouldn't > wait_lwp be looping on EINTR anyway, probably by using my_waitpid > (which is a recent addition)? Well, this isn't very robust either as waitpid isn't the only system call that could be interrupted -- it just typically has the biggest race window as it tends to sleep ... Using SA_RESTART has the advantage that it handles *all* (well, nearly all) system calls automatically, without having to add EINTR loops all over the place. If other signals are in fact a problem, too, I'd rather install them with SA_RESTART too. (However, I haven't ever seen the problem with any other signal.) Bye, Ulrich -- Dr. Ulrich Weigand Linux on zSeries Development Ulrich.Weigand@de.ibm.com