in reply to Re: Re: Running System Commans With ""
in thread Running System Commands With ""

I don't even know any OS that does so. But still it's more secure, because still no shell is started and no shell-tricks can be used. But an OS without 'char *argv[]' probably also doesn't know a shell, .. ? :)

--
http://fruiture.de
  • Comment on Re: Re: Re: Running System Commans With ""

Replies are listed 'Best First'.
Re: Re: Re: Re: Running System Commans With ""
by John M. Dlugosz (Monsignor) on Sep 12, 2002 at 15:03 UTC
    Windows gets a command-line tail (a single string) in the new process, as did DOS before it and CPM.

    The run-time library chops it up to populate argc/argv before calling main.

    As for when Perl uses a shell vs. calls the process directly, there is lots of OS-specific case code in there. I looked through it for Windows to see what it really did, and probably posted an expose here in PM, but I can't remember the details. Every other OS has its own special stuff, too, so it's quite non-portable to make such assumptions.