Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- running a PHP based daemon over SSH?
October 16, 2008, 9:06 am
rate this thread
I have a Daemon which is written as a PHP script.
I try to run it on a machine running centos via ssh. I ssh to the
machine, run the daemon, and I can see the Daemon is actually
I then exit the ssh connection and the daemon is killed.
Running C based daemons in the same manner works perfectly.
Any ideas to why this is happening?
Maybe there's something that PHP's fork is not doing properly?
Re: running a PHP based daemon over SSH?
I figured out this has to do with stdout and stderr "disappearing" for
the daemon. I can easily reproduce this without the ssh (just running
the script from the terminal and closing the terminal causes the
Daemon to die).
Redirecting all output to /dev/null solves the problem.
So I know this is becoming off-topic for this group, but still...
If anyone has any ideas on why the redirection of stdout and stderr
to /dev/null doesn't happen automatically when the shell exits I'll be
happy to hear.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum