From nobody Sun Oct 09 02:23:28 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MlQns0vJHz4YDlV; Sun, 9 Oct 2022 02:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MlQns0KGmz3vxW; Sun, 9 Oct 2022 02:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665282209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYXHPwH4KPCYAHGo1caLN+okVYah+GYNolmdKWij9cM=; b=oeQSBRJKo9TwUsc27GB4ljhNespK9Q0xSTp8Xgn6v4eTeb31XLZOgjdNSc37NjRWO0vpPv 6Ar643rRmbPLc1Xix6+iGSc3ELvQXjaoZeVmej/3mvgTZRjmheta6ESqxuLL7l54eBhRlV Hj8g62evLxSMz3/zeDm2syL7bflyMenbPmC1sgP7xWrIWjiP3rawMEBt0hd6ubM1Uqbgt7 Ji4XHjpscpvnIOEaphi0xsgT7M3nfgFfP5FYVRTq54apC8yZKXao+JCpzad3Um+OoPT1bh Z6VGWRdwrfqVZteaztaIHkb/EUrfAaPI3Vsk4pc3QDvS2CncP+OigVAMvLn37A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MlQnr6Rxpz17fY; Sun, 9 Oct 2022 02:23:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2992NS4W057107; Sun, 9 Oct 2022 02:23:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2992NSok057106; Sun, 9 Oct 2022 02:23:28 GMT (envelope-from git) Date: Sun, 9 Oct 2022 02:23:28 GMT Message-Id: <202210090223.2992NSok057106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 298d7504ae5b - stable/13 - stty(1): provide details about interaction with job control List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 298d7504ae5b83cb61816b5ef7ae987a153f9f49 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665282209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OYXHPwH4KPCYAHGo1caLN+okVYah+GYNolmdKWij9cM=; b=wYUV0JeofHW51f1SBwLDjiXST/NTJ3phXmxuhyVszTRGzHM1q/Gap4GfAiUVJ/gMpiiSZv fjz2AJMx8Vytmd8Bl7NzjLgTXtYQ1s13r+R0lP0RFOLrUSY9Z9o+G0Y8YQf+wkmMLFts8U eQhTEnc3chIwurQCAom2+qrRvcc/ZdMBBecpwh9OWnF12zlpUKOdGZNfsuM4yiEpOdSBMu YTCG9n0XDU5Yf+IVzNP1T3YnDhnOHzgRyOOxCF4iFRfEyjgJeOGua+fQP50by6fQp3LMwE r4adCBCO1t7xkx6Aby6xGKjIrVI1qVyaSik6FzYJTvu161ocrfRv7VigiXRACw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665282209; a=rsa-sha256; cv=none; b=oIaBRzKhIUGaElaSQrwmTxxBE5Eo6YIq5ooHJUXhOCwR4i+OonlMC7WEo0F+l7vtPROEmG 9dDgdU5/e/jKgkoSKVE/bDGTnVX/GV3YGSS94nZp9eCVbD0xOpvgY3WT20lyYMVVchn+Oe cG6c9W6rXbI5dtq4Q5UAZarH1R76ecc9B4F6TbmAoNQ2J70ii98Om1AxbiaOHxcOXQvPie fwySivLButzzlPxl2YSn1kaLalT+lDOifBxUgs7kKioRb8TJZtuTzxnwOMVZfEOlwbGYKC nAHaq9FdBcbtFueGoBy25TdEyYuwJbzeFuGyfAMbe1vV5ouKebBEXS+08kclfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=298d7504ae5b83cb61816b5ef7ae987a153f9f49 commit 298d7504ae5b83cb61816b5ef7ae987a153f9f49 Author: Konstantin Belousov AuthorDate: 2022-09-26 21:34:22 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-09 02:23:04 +0000 stty(1): provide details about interaction with job control PR: 266627 (cherry picked from commit a7eac018437e592a575f46a59151eedc7a742fa7) --- bin/stty/stty.1 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 1863c2286176..a72a0fee2355 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -32,7 +32,7 @@ .\" @(#)stty.1 8.4 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 20, 2018 +.Dd September 27, 2022 .Dt STTY 1 .Os .Sh NAME @@ -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