functions.php
changeset 16 23d4cf2f183b
parent 15 2adca0f363fd
child 32 86140ed9087d
equal deleted inserted replaced
15:2adca0f363fd 16:23d4cf2f183b
    37  */
    37  */
    38 
    38 
    39 function status($msg)
    39 function status($msg)
    40 {
    40 {
    41   $h = @fopen('php://stderr', 'w');
    41   $h = @fopen('php://stderr', 'w');
    42   $label = ( defined('HTTPD_WS_CHILD') ) ? 'Child ' . getmypid() : ' Greyhound ';
    42   $label = ( defined('HTTPD_WS_CHILD') ) ? 'Child ' . substr(strval(getmypid()), -3) : 'Greyhound';
    43   fwrite($h, "\x1B[32;1m[$label] \x1B[32;0m$msg\x1B[0m\n");
    43   fwrite($h, "\x1B[32;1m[$label] \x1B[32;0m$msg\x1B[0m\n");
    44   fclose($h);
    44   fclose($h);
    45 }
    45 }
    46 
    46 
    47 /**
    47 /**