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

Re: zsh 5.0.8-test-2



2015/08/22 09:10, Matthew Martin <phy1729@xxxxxxxxx> wrote:

> Running on an OpenBSD snapshot, test X02zlevi just hangs without any
> output

I've tested on my minimal install of OpenBSD 5.6. It seems the test
hangs at line 24 of comptest (in function comptestinit()):

  zpty -r zsh log1 "*<PROMPT>*" || {

Matthews, could you try with the patch at the end of this post?


OpenBSD does not have /dev/ptmx (it has /dev/ptm instead), but has
posix_openpt() function (OpenBSD 5.3 or later).

In zsh-5.0.8, USE_DEV_PTMX is not defined on OpenBSD (because it does
not have /dev/ptmx), and zpty.c uses the old BSD-style code (line 246
and below in zpty.c).

In zsh-5.0.8-test-2 (or 5.1.0rc), configure.ac has changed and
USE_DEV_PTMX is defined because posix_openpt() exists, so zpty.c uses
posix_opennt() (HAVE_POSIX_OPENPT is also defined).

It is OK if posix_openpt() really works, but the fact that X02zlevi hangs
suggests that it is not working as we expect due to some unknown
reasons. Simply undefining USE_DEV_PTMX seems to work on my OpenBSD.

Jun


diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 12e42b5..8fc6b21 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -154,7 +154,7 @@ getptycmd(char *name)
     return NULL;
 }
 
-#ifdef USE_DEV_PTMX
+#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__)
 
 #ifdef HAVE_SYS_STROPTS_H
 #include <sys/stropts.h>




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