Hi all,
I just wrote php daemon for my app and want to implement some output information generated on specified signal (SIGUSR1). I got signal handler in code
pcntl_signal(SIGUSR1, array($this, 'signal_status'));
and function handler prepared
protected function signal_status($signal_number)
{ printf("blah\n"); }
Everything work except one thing. When i send signal to my daemon (posix_kill($pid, SIGUSR1)
or even simple kill -10 pid
in bash) i got output in console that starts daemon.
Is it possible to get file descriptor of caller and not of the daemon? I wan't to send this data to specified output (for example after kill -10 PID) and not into FD of daemon.
I hope i wrote this clearly :)