mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 10:51:15 -03:00
Acquire tty if interactive when running builtins
When running a builtin, if we are an interactive shell and stdin is a tty, then acquire ownership of the terminal via tcgetpgrp() before running the builtin, and set it back after. Fixes #4540
This commit is contained in:
@@ -90,6 +90,14 @@ expect_prompt
|
||||
expect_marker 7
|
||||
print_var_contents foo
|
||||
|
||||
# Verify we don't hang on `read | cat`. See #4540.
|
||||
send_line "read | cat"
|
||||
expect_read_prompt
|
||||
send_line -h "bar\r_marker 4540"
|
||||
expect_prompt
|
||||
expect_marker 4540
|
||||
|
||||
|
||||
# ==========
|
||||
# The fix for issue #2007 initially introduced a problem when using a function
|
||||
# to read from /dev/stdin when that is associated with the tty. These tests
|
||||
|
||||
Reference in New Issue
Block a user