This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Readline on MinGW
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 <drow@false.org>
> > Cc: Mark Mitchell <mark@codesourcery.com>, 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