[openssh-commits] [openssh] 01/01: Don't install duplicate STREAMS modules on Solaris
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Apr 26 18:17:02 AEST 2019
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch V_8_0
in repository openssh.
commit 7a40c713f96388132b30e97c1d079fc9db976008
Author: Darren Tucker <dtucker at dtucker.net>
Date: Fri Apr 26 18:06:34 2019 +1000
Don't install duplicate STREAMS modules on Solaris
Check if STREAMS modules are already installed on pty before installing
since when compiling with XPG>=4 they will likely be installed already.
Prevents hangs and duplicate lines on the terminal. bz#2945 and bz#2998,
patch from djm@
---
openbsd-compat/bsd-openpty.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c
index e8ad542f..123a9be5 100644
--- a/openbsd-compat/bsd-openpty.c
+++ b/openbsd-compat/bsd-openpty.c
@@ -121,6 +121,15 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
return (-1);
}
+# if defined(I_FIND) && defined(__SVR4)
+ /*
+ * If the streams modules have already been pushed then there
+ * is no more work to do here.
+ */
+ if (ioctl(*aslave, I_FIND, "ptem") != 0)
+ return 0;
+# endif
+
/*
* Try to push the appropriate streams modules, as described
* in Solaris pts(7).
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list