From: Sarah Hoffmann Date: Tue, 13 May 2014 21:17:05 +0000 (+0200) Subject: break out of write loop when psql fails X-Git-Tag: v2.3.0~33 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/08b6fffc3638a06ee1dc7fe67fd8f7c708babeac break out of write loop when psql fails fixes hanging in --create-functions --- diff --git a/utils/setup.php b/utils/setup.php index 9e946035..e256289c 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -762,6 +762,7 @@ while(strlen($sScript)) { $written = fwrite($ahPipes[0], $sScript); + if ($written <= 0) break; $sScript = substr($sScript, $written); } fclose($ahPipes[0]);