On Wed, Apr 2, 2014 at 4:16 AM, Tom Tanner (BLOOMBERG/ LONDON) <
[email protected]> wrote:

> If you pass an array [ 'prog', '$TARGET', '$SOURCE' ] it doesn't execute a
> shell. Otherwise (passing a single string), it will examine for special
> characters, and if none are found it will split on white space and execute
> that, or it will pass that line to the shell.
>
> NB Yes, I realise this will potentially break things, but why execute a
> shell if you don't have to?
>

I don't think this would break anything.  If the command has no shell
metachars (and we can be quite conservative about that), then executing it
directly vs. via a shell will be exactly the same, except for not needing
intervening shell process.  In fact I thought SCons did this, many years
ago.  I must be thinking of Perl though. :-)  This technique can also be
used if a list is passed in; just check each word for shell metachars.

-- 
Gary
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to