Interrupt handling with virtual terminals.

walt at walt.hf.intel.com walt at walt.hf.intel.com
Tue Jul 10 02:13:30 AEST 1990


I have a program which I am running under UNIX System V/386 Release 3.2, and
I am having trouble catching the interrupt signal.  

Here's the problem:
The process switches between two virtual terminal screens.  
I have a signal handler to catch the interrupt signal, and I want to be able 
to catch this signal when either screen is being displayed.  
However, according to the manual (Release 3.2 System
Administrator's Reference manual), TERMIO(7) page 1 "The very first terminal
file opened by the process group becomes the control terminal for that process
group.   The control terminal plays a special role in handling quit and
interrupt signals, as discussed below."  Apparently, the control terminal
sends the signal to the controlling process and any other terminal owned by
the same process does not.  Consequently, when the first terminal
is being displayed ^C handling works just fine, but when the second virtual
terminal is in use the interrupt signal seems to get swallowed up and not sent
on to the process.  It does clear out the input buffer but that is all it does.  
No signal is sent to the process.

Does anyone out there know how I can get around this problem?
--
Walter Holladay                         |         walt at walt.hf.intel.com
Intel DTO, Hillsboro, OR  97124         |         uunet!intelhf!walt!walt



More information about the Comp.unix.questions mailing list