Imported Upstream version 6.12.0.152

Former-commit-id: c44e3e36633d97b5e45690b4f5395b413cb89b65
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2021-08-31 05:08:51 +00:00
parent 5c00f30246
commit cb227eef93
52 changed files with 742 additions and 734 deletions

View File

@@ -510,7 +510,15 @@ 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.
* Linux kernels < 5.13 return EINVAL,
* but versions >=5.13 return ENOTTY. */
if (errno == EINVAL || errno == ENOTTY)
return 1;
return -1;
}
activated = (signals & expected) != 0;
if (activated == value) /* Already set */