read ignores SIGINTR

Kevin P. Kleinfelter kevin at msa3b.UUCP
Fri Oct 20 11:43:55 AEST 1989


I vaguely recall seeing something about this in the doc, but I'll be darned if
I can find it again:

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.  I THINK this has to do with AIX
retrying reads on interrupts.  I KNOW I have read something about how
to make reads of the terminal behave more like SYSV reads, and not do
this retry.  This is NOT the way ALL reads behave on AIX, as code I have
written myself handles the interrupt immediately.  The REALLY odd thing is
that when I had my serial ports defined incorrectly (via devices) /bin/sh
behaved this way! (Now it does not.)

How do I make my read be in cooked mode (to allow backspace processing)
and receive signals such as SIGINT immediately?
-- 
Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347
gatech!nanovx!msa3b!kevin



More information about the Comp.unix.aix mailing list