From nobody Sun Jan 21 05:07:31 2024 X-Original-To: freebsd-bugs@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 4THhDv6j0Hz58J3s for ; Sun, 21 Jan 2024 05:07:43 +0000 (UTC) (envelope-from soumendraganguly@gmail.com) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4THhDv0qHBz4dnZ for ; Sun, 21 Jan 2024 05:07:43 +0000 (UTC) (envelope-from soumendraganguly@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="g10/+UzW"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of soumendraganguly@gmail.com designates 2607:f8b0:4864:20::f2c as permitted sender) smtp.mailfrom=soumendraganguly@gmail.com Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-6818a9fe380so14407996d6.2 for ; Sat, 20 Jan 2024 21:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705813662; x=1706418462; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=I1VLlRZBIe32nvU7KBgEuKMbEDpZaBfkUvgwWVQ5tRw=; b=g10/+UzWLnMMme8eWzVXyA2pjL5eoGkSWtx41XWdJvoqFxcQ8NMNyIarhBYsdF17LL k/+6OyOoQG8gBJzRZoDV5uWQPvnu1fpfoMXrvtZ2acWdlVpWka+XvpAAbTLF4F5wM3pK 30vx8oav77ox+C0H8bQv4KXEpP2U9hFPKzNR9h/mab1h/ZmSmLRNEK9jOxKAj/QNgHb3 sFc2U97w/aF1/dMoR03AHAbPZpUHB9lHSKj3GptquzqT8giHV+GrXWBZzsWNSY7yASxw BsOqVcKai1Z3XOZSRhkqeefWfAkCRJG7cI+aO3AAFLtulp15CJ3VN2owG5MRQbL3CLKN dLsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705813662; x=1706418462; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=I1VLlRZBIe32nvU7KBgEuKMbEDpZaBfkUvgwWVQ5tRw=; b=K9hr9dr2c4TPNdfozGkg2YCMEds4dOTKT9P3MFpOGs1fgb5pqkbJ+PHLOdBzzuEUtW quNTFk/RcXEmK4yJe8wChWjrxnWnsMshq329NT4l76UCnzBM1Hyp52cOIITGc19cVGBI AKb4VfJx9cAj5Db1ngNmO2YchQj1woZtjO8JyuEQE4AK31/eetgDX/oH2h4miY41wXBk MywfSz9p0fWX1Rpt00yyWTruVS3unxfqzk+gaJhMkrqi523xqBhZ8gsp/2R38mlagLn4 1hfu9UgnmL3LKcwMjxp2pTQFS7ADOvH20sk+vl94N7dtm9KeI32XDrjMIP8RVcwxJAjR P6pQ== X-Gm-Message-State: AOJu0YzNkcWB9UWtqRPuBOcS50KlzhMOx624/+YyyAI8+lz7+En3WHdX 6IDWtDaL/r+mXufUK7pHfx/0Pxj+slIo+BkbEl33W+etmkm6hR9GXxo/J0tjhQFv7kiWc3iO9Fs fXgQ2BnJrH6enZTzkb2RHmAvhktH7+GPsFcc= X-Google-Smtp-Source: AGHT+IGoeUYUzKsn6PqpXG7KRfbL4pkTAbKBZH2xKNM6WBlsEAIDwIBS58ltNXgwKzBmUkSw5lAskSBwD+LQwx0iano= X-Received: by 2002:a05:6214:2a8e:b0:680:f8d2:c828 with SMTP id jr14-20020a0562142a8e00b00680f8d2c828mr3861924qvb.16.1705813661693; Sat, 20 Jan 2024 21:07:41 -0800 (PST) List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 From: Soumendra Ganguly Date: Sun, 21 Jan 2024 06:07:31 +0100 Message-ID: Subject: Unset ICRNL in CBREAK mode in stty(1) following X/Open Curses To: freebsd-bugs@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005bba01060f6db19b" X-Spamd-Bar: / X-Spamd-Result: default: False [0.22 / 15.00]; PHISHING(4.00)[githubcom->github.com]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.78)[-0.779]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-bugs@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-bugs@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2c:from] X-Rspamd-Queue-Id: 4THhDv0qHBz4dnZ --0000000000005bba01060f6db19b Content-Type: text/plain; charset="UTF-8" Respected maintainers, In X/Open Curses, Issue 7 ( https://pubs.opengroup.org/onlinepubs/9699909599/toc.pdf), the following is mentioned about the cbreak mode: This mode achieves the same effect as non-canonical-mode, Case B input processing (with MIN set to 1 and *ICRNL cleared*) as specified in the XBD specification. For example, ncurses does this in NCURSES_SP_NAME(cbreak): https://github.com/mirror/ncurses/blob/87c2c84cbd2332d6d94b12a1dcaf12ad1a51a938/ncurses/tinfo/lib_raw.c#L177 My question is this: I understand that the standard linked above is NOT a specification for stty but rather for curses, and therefore the FreeBSD implementation of stty need not follow it. *But*, would this be a welcome change in stty for the sake of sticking to *some* standard? Or could this potentially break lots of existing projects? --------------------------------------------- Some context: I had made some changes in the tty library of Python to make it more standard compliant: https://githubcom/python/cpython/pull/101832 This is a part of a series of changes: https://github.com/python/cpython/issues/85984 The particular change of concern is that in `tty.setcbreak()`, I unset ICRNL. Because of this change , some old behavior is broken: https://github.com/python/cpython/issues/114328 Sincerely, Soumendra --0000000000005bba01060f6db19b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Respected maintainers,

In X/Open Curses, Issue 7 (https://= pubs.opengroup.org/onlinepubs/9699909599/toc.pdf), the following is men= tioned about the cbreak mode:

This mode achieves t= he same effect as non-canonical-mode, Case B input processing (with
MIN set to 1 and ICRNL cleared) as specified in the XBD sp= ecification.


My question is this: I understand that the standard linked above is NOT a=20 specification for stty but rather for curses, and therefore the FreeBSD=20 implementation of stty need not follow it. *But*, would this=20 be a welcome change in stty for the sake of sticking to *some* standard? Or could this potentially break lots of existing projects?
=

-------------------------------------------= --

Some context: I had made some changes in th= e tty library of Python to make it more standard compliant: https://github= com/python/cpython/pull/101832

This is a part = of a series of changes: https://github.com/python/cpython/issues/85984


Sincerely= ,
Soumendra


--0000000000005bba01060f6db19b--