Web lists-archives.com

Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.7




On Feb  7 17:14, Michael Haubenwallner wrote:
> On 2/5/19 4:18 PM, Corinna Vinschen wrote:
> > Hi folks,
> > 
> > 
> > I uploaded a new Cygwin test release 3.0.0-0.7
> > 
> 
> > Please test.
> > 
> 
> There's another regression - regarding spawn, exec and waitpid,
> loosing the exitstatus somewhere in between:
> 
> $ cat > dospawn.c <<EOF
> #include <sys/types.h>
> #include <sys/wait.h>
> #include <process.h>
> #include <stdio.h>
> 
> int main(int argc, char const **argv)
> {
>   if (argc > 1)
>     {   
>       int pid = spawnv(_P_NOWAITO, argv[1], &argv[1]);
>       if (pid) 
>         {
>           int status = 0;
>           pid_t wpid = waitpid(pid, &status, 0);
>           if (wpid > 0)
>             {
>               printf("waitpid: pid %d status 0x%x\n", pid, status); 
>               if (WIFEXITED(status))
>                 {
>                   int ret = WEXITSTATUS(status);
>                   return ret;
>                 }
>             }
>         }
>     }   
>   return 127;
> }
> EOF
> 
> $ gcc dospawn.c -o dospawn
> $ ./dospawn /bin/bash -c /bin/false
> waitpid: pid 123 status 0x0        <= 2.11.2 does provide status 0x100 as expected
> $ echo $?
> 0        <= Actually I do expect the exit status of /bin/false to show up here.
> 

Any chance you could take a look?  I haven't much time for Cygwin the
next couple of days.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

Attachment: signature.asc
Description: PGP signature