refactor for 7.2
[m6w6/ext-http] / tests / helper / server.inc
index 78a63eee3098f71de890ad2dce7e88956b4ecda5..af71a0e2a66f2244ed350f0801e46fa5cb1e6aed 100644 (file)
@@ -95,9 +95,9 @@ function nghttpd($cb) {
                        $stdout = $pipes[1];
                        $stderr = $pipes[2];
                        
                        $stdout = $pipes[1];
                        $stderr = $pipes[2];
                        
-                       usleep(50000);
+                       sleep(1);
                        $status = proc_get_status($proc);
                        $status = proc_get_status($proc);
-                       
+                       logger("nghttpd: %s", new http\Params($status));
                        if (!$status["running"]) {
                                continue;
                        }
                        if (!$status["running"]) {
                                continue;
                        }
@@ -121,6 +121,7 @@ function nghttpd($cb) {
 function proc($bin, $args, $cb) {
        $spec = array(array("pipe","r"), array("pipe","w"), array("pipe","w"));
        $comm = escapeshellcmd($bin) . " ". implode(" ", array_map("escapeshellarg", $args));
 function proc($bin, $args, $cb) {
        $spec = array(array("pipe","r"), array("pipe","w"), array("pipe","w"));
        $comm = escapeshellcmd($bin) . " ". implode(" ", array_map("escapeshellarg", $args));
+       logger("proc: %s %s", $bin, implode(" ", $args));
        if (($proc = proc_open($comm, $spec, $pipes, __DIR__))) {
                $stdin = $pipes[0];
                $stdout = $pipes[1];
        if (($proc = proc_open($comm, $spec, $pipes, __DIR__))) {
                $stdin = $pipes[0];
                $stdout = $pipes[1];