WG15 Defect Report Ref: 9945-2-131
Topic: shell signal handling


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-131

 _____________________________________________________________________________

	Topic:                  shell signal handling
	Relevant Sections:      3.11

Defect Report:
-----------------------
	From: [email protected]
	Date: Tue, 11 Jul 95 16:08:45 EDT


I wish to ask for an interpretation request of the Shell and
Utilities standard, ISO/IEC 9945-2:1993 (ISO/IEC 9945-2:1993)
related to signal handling by the shell.

In section 3.11, page 149, lines 1302-11305, the standard states,
"When a command is an asynchronous list, the shell shall
prevent SIGQUIT and SIGINT signals from the keyboard
from interrupting the command.  Otherwise, signals
shall have the values inherited by the shell process
from the parent."

This behavior differs from all historical shells.
Historical shells prevent all SIGQUIT and SIGINT signals
from interrupting the command by default.  A command
can enable these signals if they wish.

The only way to implement this requirement on 9945-1
systems, is to run the background command in a separate
process group; and even this won't work if the asynchronous
list is brought into the foreground with a fg command.

Thus, while the wording is clear, there doesn't seem to be a
way to implement this and moreover, it differs from
historical practice.  I recommend changing this clause to
the following:

"When a command is an asynchronous list, the shell shall
prevent SIGQUIT and SIGINT signals from the keyboard
from interrupting the command when the list is
in the background.  The shell may set SIGQUIT and SIGINT
to ignore for all processes in the list.  Otherwise, signals
shall have the values inherited by the shell process
from the parent."

David Korn
research!dgk
[email protected]



Interpretation response
------------------------
The standard states the requirement for handling the SIGQUIT and
SIGINT signals and conforming implementations must conform
to this. However concerns have been raised about this which are
being referred to the sponsor.

Rationale
-------------
None.

Forwarded to Interpretations group: Jul 19 1995
Recirculated for 30 day review: Oct 19 1995
Finalised: Nov 20 1995