Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@gnu.org>
To: Mark Mitchell <mark@codesourcery.com>
Cc: bug-readline@gnu.org, gdb-patches@sources.redhat.com
Subject: Re: PATCH: Readline on MinGW
Date: Thu, 28 Apr 2005 20:09:00 -0000	[thread overview]
Message-ID: <01c54c2d$Blat.v2.4$f3029840@zahav.net.il> (raw)
In-Reply-To: <4270886B.1020806@codesourcery.com> (message from Mark Mitchell on Wed, 27 Apr 2005 23:53:31 -0700)

> Date: Wed, 27 Apr 2005 23:53:31 -0700
> From: Mark Mitchell <mark@codesourcery.com>
> 
> This patch begins adding support for MinGW to readline.  There is one 
> other patche required, which is *much* smaller, but somewhat more 
> complex; this patch is the large, mechanical patch.  In general, this 
> patch checks for the availability of more things in autoconf, and then 
> disables uses of those things when they are not present.  There are no 
> actual changes to the code itself, just additional conditionals, with 
> the exception that a call to "kill" is turned into a call to the POSIX 
> "raise", which, unlike "kill", is also available on Windows.

I support all the patches suggested by Mark, except the one which
calls `raise' instead of `kill'.  Here's the relevant hunk:

> *************** rl_signal_handler (sig)
> *** 158,168 ****
>   
>   #if defined (__EMX__)
>         signal (sig, SIG_ACK);
>   #endif
>   
> !       kill (getpid (), sig);
>   
>         /* Let the signal that we just sent through.  */
>   #if defined (HAVE_POSIX_SIGNALS)
>         sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL);
>   #else /* !HAVE_POSIX_SIGNALS */
> --- 166,176 ----
>   
>   #if defined (__EMX__)
>         signal (sig, SIG_ACK);
>   #endif
>   
> !       raise (sig);
>   
>         /* Let the signal that we just sent through.  */
>   #if defined (HAVE_POSIX_SIGNALS)
>         sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL);
>   #else /* !HAVE_POSIX_SIGNALS */

I am not sure `raise' is a 100% compatible replacement for `kill',
since the latter really delivers a signal, and so is subject to rules
regarding blocked signals, while `raise' simlpy calls the signal
handler and AFAIK is not specified to observe blocked signals.

So I suggest to use `raise' only on systems, such as MinGW, which lack
`kill', not everywhere.


  reply	other threads:[~2005-04-28 20:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-28  6:53 Mark Mitchell
2005-04-28 20:09 ` Eli Zaretskii [this message]
2005-04-28 20:12   ` Daniel Jacobowitz
2005-04-28 20:45     ` Mark Mitchell
2005-04-28 21:02       ` Eli Zaretskii
2005-04-28 21:02       ` Chet Ramey
2005-04-29  0:44         ` Mark Mitchell
2005-04-29  7:31           ` Eli Zaretskii
2005-04-29 16:10             ` Christopher Faylor
2005-04-29  1:51         ` Mark Mitchell
2005-04-28 20:50     ` Eli Zaretskii
2005-04-28 21:17       ` Daniel Jacobowitz
2005-04-28 22:13         ` Andreas Schwab
2005-04-29  6:59         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01c54c2d$Blat.v2.4$f3029840@zahav.net.il' \
    --to=eliz@gnu.org \
    --cc=bug-readline@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox