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(3C)).
Unless other arrangements are made, the signal SIGHUP forces the processes to terminate (see
signal(5)
and
sigaction(2)).
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(2)).
-
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(5)
and
sigaction(2)).
-
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(2)
and
write(2)).
Unless other arrangements are made, the signal SIGTTIN or SIGTTOU forces the processes to terminate (see
signal(5)
and
sigaction(2)).
Next topic:
STREAMS-based job control
Previous topic:
Terminal access control
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004