Re: Re: svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c

From: Date: Thu, 20 Aug 2009 10:52:41 +0000
Subject: Re: Re: svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-45322@lists.php.net to get a copy of this message
2009/8/19 Stanislav Malyshev <stas@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 > stas@zend.com   http://www.zend.com/ > (408)253-8829   MSN: stas@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

« previous php.internals (#45322) next »