zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: Confirming X02zlevi test failures
Date: Fri, 21 Nov 2014 15:37:17 +0100	[thread overview]
Message-ID: <20782.1416580637@thecus.kiddle.eu> (raw)
In-Reply-To: <141120091803.ZM3693@torch.brasslantern.com>

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.

Oliver

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)
 #endif
 
     if (master) {
+#ifdef HAVE_POSIX_OPENPT
+	if ((mfd = posix_openpt(O_RDWR|O_NOCTTY)) < 0)
+#else
 	if ((mfd = open("/dev/ptmx", O_RDWR|O_NOCTTY)) < 0)
+#endif
 	    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 \


  reply	other threads:[~2014-11-21 17:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 16:50 Bart Schaefer
2014-11-19 17:25 ` Ray Andrews
2014-11-19 23:05 ` Oliver Kiddle
2014-11-20  6:20   ` Bart Schaefer
2014-11-20 15:42     ` Jun T.
2014-11-20 17:18       ` Bart Schaefer
2014-11-21 14:37         ` Oliver Kiddle [this message]
2014-11-21 18:18         ` Jun T.
2014-11-21 18:56           ` Bart Schaefer
2014-11-23  1:37             ` Jun T.
2014-11-23  3:32               ` Bart Schaefer
2014-11-23  7:44                 ` Jun T.
2014-11-24  0:11                   ` Bart Schaefer
2014-11-23  9:00               ` Oliver Kiddle
2014-11-23 18:37                 ` Bart Schaefer
2014-11-25 17:13         ` Jun T.
2014-11-25 17:32           ` Jun T.
2014-11-25 19:01             ` Bart Schaefer
2014-11-26  2:31               ` Jun T.
2014-11-26 14:51                 ` Oliver Kiddle
2014-11-26 15:45                   ` Peter Stephenson
2014-11-26 16:37                     ` Bart Schaefer
2014-11-27 14:11                       ` Oliver Kiddle
2014-12-01 10:58                         ` Jun T.
2014-12-05 14:36                           ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20782.1416580637@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).