]> code.citadel.org Git - citadel.git/blobdiff - ctdlphp/ctdlsession.php
* wait a second so the session proxy has time to start, and become responsive.
[citadel.git] / ctdlphp / ctdlsession.php
index 9dbf0ec22aa6736ed4d138aca88f08f190b34850..da8b9c2beb66f2d00102b45c01d7043b054a99ee 100644 (file)
@@ -42,10 +42,18 @@ function establish_citadel_session() {
                //exec($cmd);
 
                // It ain't there, dude.  Open up the proxy.  (PHP version)
+               if (CITADEL_DEBUG_PROXY){
+                       $stdout = '>>/tmp/sessionproxyout.txt';
+               }
+               else{
+                       $stdout = '>/dev/null';
+               }
+
                $cmd = "./sessionproxy.php " . $sockname .
-                       " </dev/null >/dev/null 2>&1 " .
+                       " </dev/null ".$stdout."2>&1 " .
                        " 3>&1 4>&1 5>&1 6>&1 7>&1 8>&1 & " ;
                exec($cmd);
+               sleep(1);
 
                // Keep attempting connections 10 times per second up to 100 times
                $attempts = 0;