break out of write loop when psql fails

fixes hanging in --create-functions
This commit is contained in:
Sarah Hoffmann 2014-05-13 23:17:05 +02:00
parent defb809b83
commit 08b6fffc36

View File

@ -762,6 +762,7 @@
while(strlen($sScript))
{
$written = fwrite($ahPipes[0], $sScript);
if ($written <= 0) break;
$sScript = substr($sScript, $written);
}
fclose($ahPipes[0]);