2009/8/19 Stanislav Malyshev <s...@zend.com>:
> Hi!
>
>> Initially, this prevents popen_ex from failing when the actual
>> executable doesn't exist, since "cmd.exe /c c:\foo\bar\xxx.exe" will
>> *always* successfully start a process. This can be seen in bug
>> #43327.
>>
>> Second, is that by having the intermediate process, I'm pretty sure
>> there's some extra-buffering of the input/output streams going on
>> (once for the child proc, and once for the cmd.exe). This (probably
>> along with a too-small pipe buffer) contributes to the behavior found
>> in #44994.
>>
>> Finally, I can't for the life of me see what benefit this brings to
>> the table.  Other languages don't need to put cmd.exe in the middle
>> of their children. The only case may be where someone wants to use
>> built-in cmd.exe commands like 'dir' on popen_ex() , which would not
>> be right anyway, and they should explicitly include the command
>> processor in their command line.
>
> It's pretty big semantic change, not just a bugfix, so I think it'd be nice
> to announce and discuss it on the list, not just put it as minor bugfix.
>
> Also it means that all output redirections, shell commands, etc. stop
> working for exec, system, etc. since they all use popen().
>
> I see code out there that uses popen-dependent functions with all this
> stuff, so it makes serious BC break.
> Also, on Unix system, popen etc. by default use shell.
>
> I recognize there might be a need for calling processes directly, but I
> think this can and should be done in BC-compatible manner.
> --
> Stanislav Malyshev, Zend Software Architect
> s...@zend.com   http://www.zend.com/
> (408)253-8829   MSN: s...@zend.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Isn't this what the bypass_shell option is for?


-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to