mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
Don't print a warning about tcgetattr if stdin is not a tty
I don't know why this doesn't happen more often, but if stdin is not a tty not being able to get terminal attributes from it is *expected*?
This commit is contained in:
parent
3af715d36f
commit
e51f4e5fc9
1 changed files with 2 additions and 0 deletions
|
@ -868,6 +868,8 @@ static bool terminal_return_from_job(job_t *j, int restore_attrs) {
|
|||
|
||||
// Save jobs terminal modes.
|
||||
if (tcgetattr(STDIN_FILENO, &j->tmodes)) {
|
||||
// If it's not a tty, it's not a tty, and there are no attributes to save (or restore)
|
||||
if (errno == ENOTTY) return false;
|
||||
if (errno == EIO) redirect_tty_output();
|
||||
FLOGF(warning, _(L"Could not return shell to foreground"));
|
||||
wperror(L"tcgetattr");
|
||||
|
|
Loading…
Reference in a new issue