Skip tcgetattr() in patty_kiss_tnc_new_fd() w/ptmx
Modify patty_kiss_tnc_new_fd() to avoid tcgetattr()/tcsetattr() when passed a file descriptor for a PTY master, to address incompatibility with BSD kernelspace Unix98 PTY implementations
This commit is contained in:
parent
3d12ab33e3
commit
81d063cb68
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ patty_kiss_tnc *patty_kiss_tnc_new_fd(int fd) {
|
||||||
goto error_malloc_buf;
|
goto error_malloc_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isatty(fd)) {
|
if (isatty(fd) && ptsname(fd) == NULL) {
|
||||||
if (tcgetattr(fd, &tnc->attrs) < 0) {
|
if (tcgetattr(fd, &tnc->attrs) < 0) {
|
||||||
goto error_tcgetattr;
|
goto error_tcgetattr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue