From a3bf38d0c172c1e24281089f72c18c08b621ed13 Mon Sep 17 00:00:00 2001 From: stevesk Date: Sun, 12 Nov 2000 09:22:29 +0000 Subject: [PATCH] - (stevesk) pty.c: HP-UX 10 and 11 don't define TIOCSCTTY. Add error() to failed ioctl(TIOCSCTTY) call. --- ChangeLog | 2 ++ pty.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bccc5650..5eb830c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ - (bal) SCO Patch to add needed libraries for configure.in. Patch by Phillips Porch - (bal) IRIX patch to adding Job Limits. Patch by Denis Parker + - (stevesk) pty.c: HP-UX 10 and 11 don't define TIOCSCTTY. Add error() to + failed ioctl(TIOCSCTTY) call. 20001111 - (djm) Added /etc/primes for kex DH group neg, fixup Makefile.in and diff --git a/pty.c b/pty.c index cdf1d128..40bfd529 100644 --- a/pty.c +++ b/pty.c @@ -238,12 +238,8 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname) /* Make it our controlling tty. */ #ifdef TIOCSCTTY debug("Setting controlling tty using TIOCSCTTY."); - /* - * We ignore errors from this, because HPSUX defines TIOCSCTTY, but - * returns EINVAL with these arguments, and there is absolutely no - * documentation. - */ - ioctl(*ttyfd, TIOCSCTTY, NULL); + if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) + error("ioctl(TIOCSCTTY): %.100s", strerror(errno)); #endif /* TIOCSCTTY */ #ifdef HAVE_NEWS4 if (setpgrp(0,0) < 0) -- 2.45.2