aboutsummaryrefslogtreecommitdiff
path: root/bin/stty/stty.1
diff options
context:
space:
mode:
Diffstat (limited to 'bin/stty/stty.1')
-rw-r--r--bin/stty/stty.136
1 files changed, 31 insertions, 5 deletions
diff --git a/bin/stty/stty.1 b/bin/stty/stty.1
index 1863c2286176..4f0126dde275 100644
--- a/bin/stty/stty.1
+++ b/bin/stty/stty.1
@@ -29,10 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)stty.1 8.4 (Berkeley) 4/18/94
-.\" $FreeBSD$
-.\"
-.Dd October 20, 2018
+.Dd September 27, 2022
.Dt STTY 1
.Os
.Sh NAME
@@ -145,7 +142,7 @@ Assume a line without (with) modem
control.
.It Cm crtscts Pq Fl crtscts
Enable (disable) RTS/CTS flow control.
-.It Cm rtsdtr Pq Fl -rtsdtr
+.It Cm rtsdtr Pq Fl rtsdtr
Enable (disable) asserting RTS/DTR on open.
.El
.Ss Input Modes:
@@ -225,6 +222,9 @@ if
.Cm imaxbel
is unset and the input queue is full, the next input character causes
the entire input and output queues to be discarded.
+.It Cm iutf8 Pq Fl iutf8
+Assume that input characters are UTF-8 encoded. Setting this flag
+causes backspace to properly delete multibyte characters in canonical mode.
.El
.Ss Output Modes:
This corresponds to the c_oflag of the termios structure.
@@ -594,6 +594,32 @@ Same as the control character
Same as the control character
.Cm reprint .
.El
+.Sh INTERACTION WITH JOB CONTROL
+Modifications to the terminal settings are treated by job control
+(see
+.Xr termios 4 )
+same as writes.
+When the
+.Nm
+utility is executing in a background process group,
+such attempts result in the kernel sending the
+.Dv SIGTTOU
+signal and stopping the process until its group is returned
+to foreground.
+The non-blocking open of the terminal device with the
+.Fl f
+option to
+.Nm
+does not affect the behavior.
+If it is desirable to modify the settings from the background,
+.Xr sh 1
+users might utilize the following idiom:
+.Bd -literal
+(trap '' TTOU; stty -f /dev/tty sane)
+.Ed
+.Pp
+Note that changing terminal settings for a running foreground
+job that is not prepared for it might cause inconsistencies.
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO