9term: Skip unnecessary ioctl call on AIX.

This commit is contained in:
Ben Huntsman 2021-08-30 08:41:21 -07:00 committed by Dan Cross
parent e9d8c45168
commit d356d2a8b2
2 changed files with 2 additions and 1 deletions

View file

@ -1,2 +1 @@
#define TIOCSCTTY 0x540E
#include "bsdpty.c" #include "bsdpty.c"

View file

@ -63,8 +63,10 @@ childpty(int fd[], char *slave)
sfd = open(slave, ORDWR); sfd = open(slave, ORDWR);
if(sfd < 0) if(sfd < 0)
sysfatal("child open %s: %r\n", slave); sysfatal("child open %s: %r\n", slave);
#if !defined (__AIX__)
if(ioctl(sfd, TIOCSCTTY, 0) < 0) if(ioctl(sfd, TIOCSCTTY, 0) < 0)
fprint(2, "ioctl TIOCSCTTY: %r\n"); fprint(2, "ioctl TIOCSCTTY: %r\n");
#endif
return sfd; return sfd;
} }