Technical data

SunOS 5.5 Ioctl Requests termio(7I)
The operating system will not normally send SIGTSTP, SIGTTIN, or SIGTTOU. signals to
a process that is a member of an orphaned process group.
These are process groups which do not have a member with a parent in another process
group that is in the same session and therefore shares the same controlling terminal.
When a member’s orphaned process group attempts to access its controlling terminal,
errors will be returned. since there is no process to continue it if it should stop.
If a member of a background process group attempts to read its controlling terminal, its
process group will be sent aSIGTTIN signal, which will normally cause the members of
that process group to stop. If, however, the process is ignoring or holdingSIGTTIN,oris
a member of an orphaned process group, the read will fail with errno set to EIO, and no
signal will be sent.
If a member of a background process group attempts to write its controlling terminal and
the TOSTOP bit is set in the c_lflag field, its process group will be sent a SIGTTOU signal,
which will normally cause the members of that process group to stop. If, however, the
process is ignoring or holdingSIGTTOU, the write will succeed. If the process is not
ignoring or holdingSIGTTOU and is a member of an orphaned process group, the write
will fail with errno set to EIO, and no signal will be sent.
If TOSTOP is set and a member of a background process group attempts to ioctl its con-
trolling terminal, and that ioctl will modify terminal parameters (for example, TCSETA,
TCSETAW, TCSETAF, or TIOCSPGRP), its process group will be sent a SIGTTOU signal,
which will normally cause the members of that process group to stop. If, however, the
process is ignoring or holdingSIGTTOU, the ioctl will succeed. If the process is not
ignoring or holdingSIGTTOU and is a member of an orphaned process group, the write
will fail with errno set to EIO, and no signal will be sent.
Canonical mode
input processing
Normally, terminal input is processed in units of lines. A line is delimited by a newline
(ASCII LF) character, an end-of-file (ASCII EOT) character, or an end-of-line character.
This means that a program attempting to read will be suspended until an entire line has
been typed. Also, no matter how many characters are requested in the read call, at most
one line will be returned. It is not necessary, however, to read a whole line at once; any
number of characters may be requested in a read, even one, without losing information.
During input, erase and kill processing is normally done. The ERASE character (by
default, the character DEL ) erases the last character typed. The WERASE character (the
character control-W) erases the last “word” typed in the current input line (but not any
preceding spaces or tabs). A “word” is defined as a sequence of non-blank characters,
with tabs counted as blanks. NeitherERASE nor WERASE will erase beyond the beginning
of the line. TheKILL character (by default, the character NAK ) kills (deletes) the entire
input line, and optionally outputs a newline character. All these characters operate on a
key stroke basis, independentof any backspacing or tabbing that may have been done.
The REPRINT character (the character control-R) prints a newline followed by all charac-
ters that have not beenread. Reprinting also occurs automatically if characters that
would normally be erased from the screen are fouled by program output. The characters
are reprinted as if they were beingechoed; consequencely, if ECHO is not set, they are
not printed.
modified 30 May 1995 7I-347