From d356d2a8b2436266d7b2fceabc3d281bc3e360a7 Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Mon, 30 Aug 2021 08:41:21 -0700 Subject: [PATCH] 9term: Skip unnecessary ioctl call on AIX. --- src/cmd/9term/AIX.c | 1 - src/cmd/9term/bsdpty.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/9term/AIX.c b/src/cmd/9term/AIX.c index b7ccbf0f..eec79c28 100644 --- a/src/cmd/9term/AIX.c +++ b/src/cmd/9term/AIX.c @@ -1,2 +1 @@ -#define TIOCSCTTY 0x540E #include "bsdpty.c" diff --git a/src/cmd/9term/bsdpty.c b/src/cmd/9term/bsdpty.c index 3710a18d..e7e047e3 100644 --- a/src/cmd/9term/bsdpty.c +++ b/src/cmd/9term/bsdpty.c @@ -63,8 +63,10 @@ childpty(int fd[], char *slave) sfd = open(slave, ORDWR); if(sfd < 0) sysfatal("child open %s: %r\n", slave); +#if !defined (__AIX__) if(ioctl(sfd, TIOCSCTTY, 0) < 0) fprint(2, "ioctl TIOCSCTTY: %r\n"); +#endif return sfd; }