[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

SIGINT handling

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-03-07 20:11:07 CET

On Wed, Mar 07, 2007 at 01:43:46PM -0500, David Glasser wrote:
> thing I noticed was that it seems to not want to be canceled; it seems
> to ignore SIGINTS, and I had to kill -9 it to cancel it. I assume

This is a fairly common user report, incidentally. While we're better
about cancellation than we used to be, I'm curious as to why we don't
just make two Ctrl-C's in a row kill the process.

i.e. change the signal handler for our command-line tools from e.g.

static void
signal_handler(int signum)
{
  apr_signal(signum, SIG_IGN);
  cancelled = TRUE;
}

to

static void
signal_handler(int signum)
{
  if (!cancelled)
    apr_signal(signum, SIG_IGN);
  cancelled = TRUE;
}

Any reason this isn't a sensible idea? It seems really simple.

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Wed Mar 7 20:11:27 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.