kernel: Restore prim_tty signals option to pass control bytes through in raw mode - #11514
kernel: Restore prim_tty signals option to pass control bytes through in raw mode#11514gilbertwong96 wants to merge 1 commit into
Conversation
CT Test Results 5 files 288 suites 3h 1m 24s ⏱️ For more details on these failures, see this check. Results for commit f6d030c. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
f0be34d to
25a4cfc
Compare
|
Hello! Thanks for the pr!
and then pass that option all the way down to prim_tty. The code should also be able to handle that we switch the option on and off again, so the tests should check that that is possible. Also windows needs to be handled as well and there it is the As this is a new API it will not be patched into older versions, but released in the next feature release. In the future, if you find that you need to use some internal module, please create an issue and let us know so that we can create a public API for it so that it does not get lost. |
25a4cfc to
f6d030c
Compare
|
Thanks for the review! I've reworked the PR along these lines:
The PR is now based on |
shell:start_interactive/1 can now take {noshell, #{mode => raw,
signals => false}} to disable the terminal driver's signal and flow
control handling in raw mode, so that control bytes such as ctrl+s/q,
ctrl+c and ctrl+o are passed to the application as data instead of
being intercepted. The option is passed through user_drv to prim_tty
and can be switched on and off at runtime. On Windows,
ENABLE_PROCESSED_INPUT is cleared when signals is false.
This restores the prim_tty sig option that was dropped in the OTP 28
shell improvements.
f6d030c to
805f6a9
Compare
Fixes #11512.
Expose the fix in the public API instead of the internal prim_tty module:
shell:start_interactive({noshell, #{mode => raw, signals => false}})nowdisables the terminal driver's signal and flow control handling in raw
mode, so control bytes (ctrl+o, ctrl+c, ctrl+s/q) reach the application
as data. The option is passed down through user_drv to prim_tty and can
be switched on and off at runtime. On Windows, ENABLE_PROCESSED_INPUT is
cleared.
The test runs a noshell peer on a run_erl pty and verifies that ctrl+o is
delivered, then swallowed, then delivered again as the option is toggled.