summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-02-26 12:46:05 +0100
committerAndrew Dolgov <[email protected]>2008-02-26 12:46:05 +0100
commit2a6a93953b62a30543f61ede5255f29e167ab602 (patch)
tree6f98cf046071b24b9d75bee41236bc97a9ab5eea
parente78fd196a953220ec9244d9f46841f9161f14849 (diff)
only use posix_getpid() for debugging when possible
-rw-r--r--functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 873df424d..024232e9a 100644
--- a/functions.php
+++ b/functions.php
@@ -87,7 +87,9 @@
*/
function _debug($msg) {
$ts = strftime("%H:%M:%S", time());
- $ts = "$ts/" . posix_getpid();
+ if (function_exists('posix_getpid')) {
+ $ts = "$ts/" . posix_getpid();
+ }
print "[$ts] $msg\n";
} // function _debug