Subject: Re: Zsh on Ubuntu on Windows
From: Bart Schaefer <[email-masked]>
To: "Zsh Hackers' List" <[email-masked]>
Cc: Tyler James Leonhardt <[email-masked]>
Date: Sat, 23 Apr 2016 14:40:10 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Sat, Apr 23, 2016 at 6:29 AM, Tyler James Leonhardt
<[email-masked]> wrote:
>
> Unfortunately, it hasn’t been working. I’m not sure if this is a zsh issue
> or if Microsoft’s subsystem for Ubuntu is just acting up. I found this
> issue on the oh-my-zsh repo:
>
> https://github.com/robbyrussell/oh-my-zsh/issues/4984

Based on the error message in that report, either zsh was compiled
with the wrong config.h settings or Microsoft's emulation of one of
the wait() family of system calls is incomplete.  I don't know which
of the following #ifdef branches is being used --

#ifdef HAVE_WAIT3
# ifdef HAVE_GETRUSAGE
        struct rusage ru;

        pid = wait3((void *)&status, WAITFLAGS, &ru);
# else
        pid = wait3((void *)&status, WAITFLAGS, NULL);
# endif
#else
# ifdef HAVE_WAITPID
        pid = waitpid(-1, &status, WAITFLAGS);
# else
        pid = wait(&status);
# endif
#endif

-- but the error message indicates that the returned pid == -1 and
errno has been set to "invalid argument", so something is askew in
whichever branch it was.

Who compiled the zsh you are using?