term: ptmx: don't abort on EAGAIN when trying to read from ptxm

This commit is contained in:
Daniel Eklöf 2020-06-19 11:33:03 +02:00
parent c94cbdeb64
commit e466063020
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -160,6 +160,9 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
count = read(term->ptmx, buf, sizeof(buf));
if (count < 0) {
if (errno == EAGAIN)
return true;
LOG_ERRNO("failed to read from pseudo terminal");
return false;
}