From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx> Fix the remaining issues that I'm aware of when using the built in "add -p" with interactive.singlekey that are stopping it from being merged to master. The first three patches make sure that we call tcsetattr() and the same file descriptor that we use for read() and work around poll() being broken when reading from terminals on macos. The final patch is more of an improvement rather than a bug fix (the same issue already exists in the perl version) and could proceed separately. Unfortunately these patches conflict with 'cb/save-term-across-editor-invocation' as well as the textual conflicts there is a semantic conflict as the argument to save_term() is changed so the code in editor.c will need updating. These patches are based on 'pw/single-key-interactive' Phillip Wood (4): terminal: use flags for save_term() terminal: don't assume stdin is /dev/tty terminal: work around macos poll() bug terminal: restore settings on SIGTSTP compat/terminal.c | 205 +++++++++++++++++++++++++++++++++++++++------- compat/terminal.h | 6 +- 2 files changed, 182 insertions(+), 29 deletions(-) -- 2.35.1