From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18296 invoked by alias); 24 Mar 2006 20:47:44 -0000 Received: (qmail 18279 invoked by uid 22791); 24 Mar 2006 20:47:43 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 24 Mar 2006 20:47:42 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FMtC8-0007GY-2f; Fri, 24 Mar 2006 15:47:40 -0500 Date: Fri, 24 Mar 2006 21:07:00 -0000 From: Daniel Jacobowitz To: John Fodor Cc: gdb@sourceware.org Subject: Re: gdb and multi-threaded (NPTL) programs Message-ID: <20060324204740.GA27767@nevyn.them.org> Mail-Followup-To: John Fodor , gdb@sourceware.org References: <44244F1F.6030108@mac.com> <20060324201526.GA26907@nevyn.them.org> <44245A19.8060808@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44245A19.8060808@mac.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00178.txt.bz2 On Fri, Mar 24, 2006 at 03:44:09PM -0500, John Fodor wrote: > Sounds like a good idea. Let me know how it goes :) Sorry, you're the one objecting to the current behavior :-) I've done my share of fixing these bugs; I don't have time to try another one. > I wasn't referring to sem_wait specifically. I was thinking of any > general syscall that will return EINTR after a SIGALARM. That's receving a signal, not timing out. But anyway. > >In practice this does not bother most programmers. If your application > >uses signals, it often needs to do this anyway! > > > > If you use signals you can set SA_RESTART for catchable signals. That only works for restartable syscalls - sem_wait is not, in fact, restartable, and I believe that restarting it after SA_RESTART would violate the POSIX spec. Not 100% sure on that though. -- Daniel Jacobowitz CodeSourcery