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

Re: Hang in E01 due to zpty on OpenBSD



On Thu, Apr 07, 2022 at 12:47:18PM +0900, Jun T wrote:
> 
> > 2022/04/06 21:53, Matthew Martin <phy1729@xxxxxxxxx> wrote:
> > 
> > I'd prefer something like the below where it's a feature test instead of
> > an OS test.
> 
> I was thinking that we should better minimize the possible side effects
> just before the new release.
> 
> If we use your patch (with some fixes) openpty() will be used on ALL systems
> (Linux, other BSDs and macOS, ...) if it is available. Is this what you
> want to achieve? It may work but we need to test on lots of systems.

I was thinking I'd wait until after the release and put the patch in the
OpenBSD port until the next release. That way things are fixed with no
need to rush.

> > diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
> (snip)
> > +#elifdef USE_DEV_PTMX
> #elif defined(USE_DEV_PTMX)
> 
> > -#elif defined(__OpenBSD__)
> > -    static char char1[] = "pqrstuvwxyzPQRST";
> > -    static char char2[] = "0123456789"
> > -                          "abcdefghijklmnopqrstuvwxyz"
> > -                          "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

They no longer really support the /dev/ptyxx route. When I asked the
response I got was, why do you think that should work it's dead and
archaic. If openpty is removed in the future, falling back to /dev/pty
is unlikely to be an option.

> > diff --git a/configure.ac b/configure.ac
> (snip)
> > +AC_MSG_CHECKING([for openpty])
> > +openpty=no
> 
> We need to call AC_SEARCH_LIBS(openpty, util) here to add -lutil to LIBS.
> Otherwise the following two AC_LINK_IFELSE() fail and openpty() will never
> be used.

It worked here, but I don't claim to be an auto* expert. So just put the
AC_SEARCH_LIBS before AC_MSG_CHECKING (otherwise the output is mixed up)?




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