2
0
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:
Rene Rivera
2004-03-05 07:53:32 +00:00
parent 8327757da1
commit d5003fc843
2 changed files with 14 additions and 0 deletions

View File

@@ -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" );

View File

@@ -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" );