I have put together a simple twisted server using xmlrpc and process. I
want to run this server as a unix daemon.
Specifically, detach from controlling terminal, and redirect stdout, stderr
to a log file.
What is the easiest approach, and where to look for documentation on this?
I often use "nohup" for this sort of thing. An alternative would be to add
it to /etc/init.d and /etc/rc?.d
Cheers,
Jason
On Fri, Nov 5, 2010 at 1:40 PM, Neal Becker wrote:
> I have put together a simple twisted server using xmlrpc and process. I
> want to run this server as a unix daemon.
>
On Nov 5, 2010, at 1:40 PM, Neal Becker wrote:
> I have put together a simple twisted server using xmlrpc and process. I
> want to run this server as a unix daemon.
>
> Specifically, detach from controlling terminal, and redirect stdout, stderr
> to a log file.
>
> What is the easiest approa
On Fri, Nov 5, 2010 at 17:40, Neal Becker wrote:
> I have put together a simple twisted server using xmlrpc and process. I
> want to run this server as a unix daemon.
You might want to have a look at daemontools
(http://cr.yp.to/daemontools.html). It will also take care of
restarting your daemon
Hi,
A while back on Oct 13, 2010, at 7:20 PM, James Y Knight wrote:
> You need to avoid using or importing any OSX APIs until after the
> daemonization has occurred. Unfortunately, twisted executes the entire script
> file before daemonizing. [that's unfortunate for other reasons besides this,
Using this code:
...
def processEnded(self, reason):
print "processEnded, task %s, status %s" % (self.task,
reason.value.exitCode,)
Here is what I get from a normally terminated process
processEnded, task ['sleep', '4']31662, status 0
But now I kill the subprocess, with SIGTERM, and
On Fri, Nov 05, 2010 at 07:28:24PM -0400, Neal Becker wrote:
> The status
> is passed in the form of a Failure instance, created with a .value that
> either holds a ProcessDone object if the process terminated normally (it
> died of natural causes instead of receiving a signal, and if the exit c
Hi!
I've figured out vaguely how to use Conch as a file transfer client
thanks to the cftp script. I'm currently trying to adapt the simple
SSH server script example (link below) to do file *serving*. I can't
find any example code that actually does this or documentation on this
subject.
There's