Modem disconnect
The following arrangements are made to allow processes that read from a terminal-device-file and test for end-of-file to terminate appropriately when a modem-disconnect is detected on the terminal-device:
-
All processes with that terminal as the controlling terminal receive
a hang-up signal, SIGHUP, if CLOCAL is clear
in the c_cflags for the terminal (see
``Control modes''
and
termios(S)).
Unless other arrangements are made, the signal SIGHUP forces the processes to terminate (see
signal(M)
and
sigaction(S)).
If the signal SIGHUP is ignored or caught by a signal-catching function, any subsequent read returns 0 to indicate end-of-file until the terminal-device-file is closed (see
read(S)).
-
If the controlling process is not in the foreground process group
of the terminal,
the signal SIGTSTP is sent to all processes
in the foreground process group for which the terminal
is the controlling terminal.
Unless other arrangements are made, the signal SIGTSTP forces the processes to terminate (see
signal(M)
and
sigaction(S)).
-
Processes in background process groups that try a read
or a write of the controlling terminal
after a modem-disconnect while the terminal is still assigned
to the session receive the appropriate signal,
SIGTTIN or SIGTTOU respectively (see
read(S)
and
write(S)).
Unless other arrangements are made, the signal SIGTTIN or SIGTTOU forces the processes to terminate (see
signal(M)
and
sigaction(S)).
Next topic:
STREAMS-based job control
Previous topic:
Terminal access control
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005