From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26104 invoked by alias); 28 Apr 2005 21:17:45 -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 25840 invoked from network); 28 Apr 2005 21:17:36 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 28 Apr 2005 21:17:36 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DRGO7-0004X3-Jw; Thu, 28 Apr 2005 17:17:35 -0400 Date: Thu, 28 Apr 2005 21:17:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: bug-readline@gnu.org, gdb-patches@sources.redhat.com Subject: Re: PATCH: Readline on MinGW Message-ID: <20050428211735.GA17310@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , bug-readline@gnu.org, gdb-patches@sources.redhat.com References: <4270886B.1020806@codesourcery.com> <01c54c2d$Blat.v2.4$f3029840@zahav.net.il> <20050428201215.GA14846@nevyn.them.org> <01c54c33$Blat.v2.4$bff25520@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c54c33$Blat.v2.4$bff25520@zahav.net.il> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00404.txt.bz2 On Thu, Apr 28, 2005 at 11:48:17PM +0300, Eli Zaretskii wrote: > > Date: Thu, 28 Apr 2005 16:12:15 -0400 > > From: Daniel Jacobowitz > > Cc: Mark Mitchell , bug-readline@gnu.org, > > gdb-patches@sources.redhat.com > > > > Could you give me a reference for this? POSIX disagrees: > > > > http://www.opengroup.org/onlinepubs/009695399/functions/raise.html > > Well, perhaps I misunderstand the language of Posix, but in this text: > > Otherwise, the effect of the raise() function shall be equivalent to calling: > > kill(getpid(), sig); > > why did they use "Otherwise"? To me, this says that `raise' is not > always the equivalent of `kill''. Because in an environment which supports multiple threads, it behaves as pthread_kill (pthread_self(), sig) as described above. Which does: The pthread_kill() function shall request that a signal be delivered to the specified thread. As in kill(), if sig is zero, error checking shall be performed but no signal shall actually be sent. > In any case, it is traditional on Posix platforms to use `kill', not > `raise'. I think the latter was introduced by ANSI/ISO C; if Readline > does not mandate an ISO C compiler like GDB does, it would make more > sense to use `raise' only if `kill' is unavailable. This isn't right. POSIX mandates the existence of raise; ANSI/ISO C does not specify anything having to do with signals. Anyway, I've got no problem with using autoconf for this, but I can't think of any case where it would make a difference. -- Daniel Jacobowitz CodeSourcery, LLC