Redirecting STDERR to a file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I was trying to write a script  in PHP that takes a program name
as an argument and invoke it as a daemon.
PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask,
so it was easy.
However, I couldn't find a way  to redirect STDERR a file.
I like to have the daemon write its log to its  own logfile, like
apache and mysql do.

So is there any way to accomplish that?
Any pointers, suggestions would be greatly appreciated.

Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux