Indefero

Indefero Commit Details


Date:2011-06-10 17:44:32 (13 years 6 months ago)
Author:Thomas Keller
Branch:develop, feature.content-md5, feature.diff-whitespace, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:2f30e4e2f6670bdb25fdf2bc45cf54b42a8dd643
Parents: 118ca9f11fa5ba7eb54641394bf6edd75f9227c0
Message:Fix a regression introduced with commit 20c3f14cc: If we can read from a process' pipe doesn't mean the exit code of the process in question is zero, this is actually what pclose() returns.

Changes:

File differences

src/IDF/Scm.php
101101
102102
103103
104
104
105105
106106
107107
108108
109
110109
111110
112111
113
112
114113
115114
116115
*/
public static function exec($caller, $cmd, &$out=null, &$return=null)
{
$return = 1;
$return = -1;
Pluf_Log::stime('timer');
$fp = popen($cmd, 'r');
$buf = '';
if ($fp !== false) {
$return = 0;
while (!feof($fp)) {
$buf .= fread($fp, 1024);
}
pclose($fp);
$return = pclose($fp);
}
$out = preg_split('/\r\n|\r|\n/', $buf);
$elem = count($out);

Archive Download the corresponding diff file

Page rendered in 0.10355s using 13 queries.