mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Fix problem of setting JAMSHELL to % and executing quoted commands. That combination would cause spawn: invalid argument errors. Now quotes are removed from the command if they are present.
[SVN r22433]
This commit is contained in:
@@ -674,6 +674,13 @@ execcmd(
|
||||
}
|
||||
|
||||
/* the rest is for Windows NT only */
|
||||
/* spawn doesn't like quotes aroudn the command name */
|
||||
if ( argv[0][0] == '"')
|
||||
{
|
||||
int l = strlen(argv[0]);
|
||||
if (argv[0][l-1] == '"') argv[0][l-1] = '\0';
|
||||
strcpy(argv[0],argv[0]+1);
|
||||
}
|
||||
if( ( pid = spawnvp( P_NOWAIT, argv[0], argv ) ) == -1 )
|
||||
{
|
||||
perror( "spawn" );
|
||||
|
||||
@@ -674,6 +674,13 @@ execcmd(
|
||||
}
|
||||
|
||||
/* the rest is for Windows NT only */
|
||||
/* spawn doesn't like quotes aroudn the command name */
|
||||
if ( argv[0][0] == '"')
|
||||
{
|
||||
int l = strlen(argv[0]);
|
||||
if (argv[0][l-1] == '"') argv[0][l-1] = '\0';
|
||||
strcpy(argv[0],argv[0]+1);
|
||||
}
|
||||
if( ( pid = spawnvp( P_NOWAIT, argv[0], argv ) ) == -1 )
|
||||
{
|
||||
perror( "spawn" );
|
||||
|
||||
Reference in New Issue
Block a user