mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 16:49:54 +00:00
Shell: Make sure TTY echo is enabled when running external commands
When running external commands via "Shell -c" LibLine turns of TTY echo before running the command. This ensures that it is turned on.
This commit is contained in:
parent
18f507520e
commit
07cc7eed29
Notes:
sideshowbarker
2024-07-18 07:31:03 +09:00
Author: https://github.com/gunnarbeutner
Commit: 07cc7eed29
Pull-request: https://github.com/SerenityOS/serenity/pull/9197
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 3 additions and 0 deletions
|
@ -568,9 +568,12 @@ int Shell::run_command(const StringView& cmd, Optional<SourcePosition> source_po
|
||||||
}
|
}
|
||||||
|
|
||||||
tcgetattr(0, &termios);
|
tcgetattr(0, &termios);
|
||||||
|
tcsetattr(0, TCSANOW, &default_termios);
|
||||||
|
|
||||||
command->run(*this);
|
command->run(*this);
|
||||||
|
|
||||||
|
tcsetattr(0, TCSANOW, &termios);
|
||||||
|
|
||||||
if (!has_error(ShellError::None)) {
|
if (!has_error(ShellError::None)) {
|
||||||
possibly_print_error();
|
possibly_print_error();
|
||||||
take_error();
|
take_error();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue