diff options
author | csanchezdll <csanchezdll@gmail.com> | 2020-08-31 16:15:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 16:15:09 +0300 |
commit | 59ee4edb6eec18eb6b651a61957ddba09e7d8434 (patch) | |
tree | 051d17ab4edbd2bc97b2343993b770a8e777593b /support | |
parent | c58000534f16168a2de564a911cea9576053b5ef (diff) |
Ignore EINVAL errors on ioctl TIOCMGET/TIOCMSET so (#20219)
pseudo-ttys are usable. (#20218)
Diffstat (limited to 'support')
-rw-r--r-- | support/serial.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/support/serial.c b/support/serial.c index 74c54b0a21c..859dee81502 100644 --- a/support/serial.c +++ b/support/serial.c @@ -510,7 +510,13 @@ set_signal (int fd, MonoSerialSignal signal, gboolean value) expected = get_signal_code (signal); if (ioctl (fd, TIOCMGET, &signals) == -1) - return -1; + { + /* Return successfully for pseudo-ttys. */ + if (errno == EINVAL) + return 1; + + return -1; + } activated = (signals & expected) != 0; if (activated == value) /* Already set */ |