Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Confirming X02zlevi test failures

Bart wrote:
> I begin to suspect that what needs to happen is that zpty needs to be a
> lot more aggressive internally about consuming (and buffering up) the
> slave output as fast as it appears, even if a zpty read call has not
> yet been made from the shell.  Clearly the slave can "see" it's own
> output if the master doesn't manage to grab it first.

That might be worth a try.

I tried the following change to see if it would have an effect.
It results in zpty getting a device such as /dev/pts/2 instead of
/dev/ttyp0 on FreeBSD. I suspect it might also avoid the need to kldload
pty but would need to reboot a remote machine to confirm. So I think it
is useful anyway. Unfortunately it has no effect on the bug.


diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index d119658..63c79a7 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -189,7 +189,11 @@ get_pty(int master, int *retfd)
     if (master) {
+	if ((mfd = posix_openpt(O_RDWR|O_NOCTTY)) < 0)
 	if ((mfd = open("/dev/ptmx", O_RDWR|O_NOCTTY)) < 0)
 	    return 1;
 	if (grantpt(mfd) || unlockpt(mfd) || !(name = ptsname(mfd))) {
diff --git a/configure.ac b/configure.ac
index 306a005..56c4cfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1291,6 +1291,7 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \
 	       pcre_compile pcre_study pcre_exec \
 	       nl_langinfo \
 	       erand48 open_memstream \
+	       posix_openpt \
 	       wctomb iconv \
 	       grantpt unlockpt ptsname \
 	       htons ntohs \

Messages sorted by: Reverse Date, Date, Thread, Author