On Sat, 10 May 2003 17:32:33 +0900
Brian Candler <B.Candler / pobox.com> wrote:

> Maybe it could exec the target program
> directly and *not* go via a shell, in cases where the shell is not needed
> (i.e. no pipes or redirection). 

This is what happens when you call system() with more then one argument.

>> system("ls $HOME")        
Mail  bin  data  doc  downloads  etc  homework  mnt  opt  prog  tmp
=> true                         
>> system("ls", "$HOME")        
ls: $HOME: No such file or directory
=> false

Note: It's a Good Idea(tm) to do this when possible because it avoids quoting
problems.

>> system("cat Filename with spaces")
cat: Filename: No such file or directory
cat: with: No such file or directory
cat: spaces: No such file or directory
=> false
>> system("cat", "Filename with spaces")
cat: Filename with spaces: No such file or directory
=> false                        

Jason Creighton