Re: Redirecting STDERR to a file?

From: Date: Sat, 02 Feb 2008 08:25:12 +0000
Subject: Re: Redirecting STDERR to a file?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-268557@lists.php.net to get a copy of this message
js wrote: > 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. I think "nohup <program> 2>errorlog" will do what you're after. /Per Jessen, Zürich

« previous php.general (#268557) next »