open_init_pty: Do not error on EINTR
There is a signal handler so that the select returns EINTR when the child exits. EINTR is used to then clean up and flush the remaining buffers. It should not error. Signed-off-by: Jason Zaman <jason@perfinion.com>
This commit is contained in:
parent
77e86c0b8c
commit
0576ba5268
|
@ -327,8 +327,9 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
int select_rc = select(pty_master + 1, &readfds, &writefds, NULL, NULL);
|
int select_rc = select(pty_master + 1, &readfds, &writefds, NULL, NULL);
|
||||||
if (select_rc < 0) {
|
if (select_rc < 0 && errno != EINTR) {
|
||||||
perror("select()");
|
perror("select()");
|
||||||
exit(EX_IOERR);
|
exit(EX_IOERR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue