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

Re: Hang in E01 due to zpty on OpenBSD



> 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.


> 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";
I think we need to keep this in case openpty() is not available on OpenBSD.

> 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.





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