﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
334	spawn() fails to execute .cmd if COMSPEC is set to /bin/sh	KO Myung-Hun		"Hi/2.

How to reproduce.

{{{
set COMSPEC=/bin/sh
spawn spawn_comspec.cmd
}}}

The result is

{{{
/bin/sh: /C: No such file or directory
spawnvp() = 1
}}}

The following are sources of a testcase.

spawn.c
{{{
#include <stdio.h>
#include <process.h>

int main( int argc, char *argv[])
{
    int rc;

    if( argc < 2 )
    {
        fprintf( stderr, ""Usage: spawn program\n"");

        return 1;
    }

    rc = spawnvp( P_WAIT, argv[ 1 ], &argv[ 1 ]);
    printf(""spawnvp() = %d\n"", rc );
    if( rc == -1 )
        perror(""spawnvp()"");

    return !!rc;
}
}}}

spawn_comspec.cmd
{{{
echo hello
}}}
"	defect	new	normal	libc-0.7	libc	0.6.6	normal			
