read ignores SIGINTR
Jon H. LaBadie
jon at jonlab.UUCP
Mon Oct 23 15:18:41 AEST 1989
For starts, let me say I have not mucked around in the AIX kernel;
I have played with the System V kernel and my comments are based on
that experience.
In article <1162 at msa3b.UUCP>, kevin at msa3b.UUCP (Kevin P. Kleinfelter) writes:
> I have a "read(2)" call in a ported program. DEL is defined as the "intr"
> key. The program has an exception handler for the SIGINT interrupt.
> When the read call is executed, I hit DEL, and the interrupt handler is NOT
> executed. Then I hit RETURN, and the signal handler IS executed.
> I don't think the terminal is in RAW mode, because the signal handler is
> executed once the newline is read. ...
When a process executes a system call and enters a sleep state, the
process priority is set to a high priority level, typically between
1 and 40 (low numerically, high priority). Within this range, two
sub-ranges exist, interuptable and non-interuptable. Typically they
are 1-25 (non-interuptable) and 26-40 (interuptable). Non-interuptable
priorities are used for those types of events that are pretty certain
to finish quickly. For example, disk I/O. Interuptable priorities are
assigned to those events that have less certain completions; for example
terminal I/O - humans can be so SSLLOOWW..
System calls at a non-interuptable only check for signals upon entry and
exit from the system call. Your description (interupt handler invoked
upon hitting RETURN, not the DEL key) sounds like terminal I/O under AIX
is not interuptable. Thus, signals pending would only be checked upon
exit from the system call.
> How do I make my read be in cooked mode (to allow backspace processing)
> and receive signals such as SIGINT immediately?
Now this is a different question! Investigate "cbreak" mode to allow
cannonical processing. It is kind of like not "raw", not "cooked",
but "rare" terminal I/O.
--
Jon LaBadie
{att, princeton, bcr}!jonlab!jon
{att, attmail, bcr}!auxnj!jon
More information about the Comp.unix.aix
mailing list