delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/13/03:56:48

Date: Tue, 13 Jan 1998 10:56:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Request for comments: SIGQUIT in DJGPP v2.02
In-Reply-To: <199801111908.OAA25285@delorie.com>
Message-ID: <Pine.SUN.3.91.980113105615.5496L-100000@is>
MIME-Version: 1.0

On Sun, 11 Jan 1998, DJ Delorie wrote:

> The default handler for SIGQUIT should be SIG_IGN instead of unix's
> standard core dump. Even setting SIGQUIT to SIG_DFL should set it to
> SIG_IGN.  When SIGQUIT is ignored, that key should be treated as any
> other key.

I thought about this some more, and there are two aspects that still
bother me.

First, if we make the default action of SIGQUIT be to ignore the
signal, then we should have an easy way to make it cause abort with
a traceback as well.  This seems to call for a function that can be
installed as a signal handler, and will then write the traceback and
exit.  If you think this is a good idea, it can be done quite easily.

The second aspect is somewhat nasty.  Our keyboard handler deals with
scan codes of the keys, not their ASCII codes.  However, some non-US
keyboards change the scan codes of some keys, and `\' is one of them.
Some of them even do it in a way that makes Ctrl-\ difficult if not
impossible to generate.

This arises the question of what key should generate SIGQUIT by
default.  If SIGQUIT is ignored by default, this is less of a problem,
but it doesn't go away completely.  One solution is to ignore the
problem, use the scan code that results in `\' on US keyboards and
tell applications that want to go international to deal with it (they
can change the QUIT key as appropriate if they detect a non-US
keyboard).  Another possibility is to choose a key that isn't remapped
(yet another deviation from Unix default SIGQUIT behavior).  What do
you think?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019