exar...@twistedmatrix.com wrote:
> On 03:47 pm, ndbeck...@gmail.com wrote:
>>Using processProtocol. If a child is stopped (e.g., by SIGSTOP), is
>>there
>>some way to detect this?
>
> The parent will get a SIGCHLD when the child gets SIGSTOP or SIGCONT.
> Using sigaction, you can learn which pro
Using processProtocol. If a child is stopped (e.g., by SIGSTOP), is there
some way to detect this?
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
One more piece seems available:
http://code.google.com/p/python-atfork/
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
My simple batch processing system is moved here:
http://code.google.com/p/batch-queue/
Seems to be reasonably functional. Any suggestions/contributions
appreciated.
One thing todo is to add some authentication. For now the server listens
for xmlrpc requests and will run any command without a
Thanks for the suggestions.
I'd also like to add authentication, but it seems rather daunting.
Maybe I could just restrict the xmlrpc to listen only on connection from the
local host?
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
h
I seem to have things working OK with twistd.
My app is a batch scheduling system that listens for commands via xmlrpc.
It is very simple at this point, and I'm attaching it. I would welcome any
suggestions for improvement, since I'm a newb to twisted, and a lot of this
was guesswork.
task.p
Itamar Turner-Trauring wrote:
> On Mon, 2010-11-08 at 08:53 -0500, Neal Becker wrote:
>> I try to daemonize twisted, but it uses 100% cpu.
>>
>> The problem occurs in this code:
>
> Why not use twistd, which does all this for you already? E.g.
> http://twistedma
I try to daemonize twisted, but it uses 100% cpu.
The problem occurs in this code:
def daemonize(log_stdout=False, out_name=None, log_stderr=False,
err_name=None):
"""
Turn current process into a daemon
"""
pid = os.fork()
if (pid == 0):
##os.chdir (workdir)
o
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
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?
On modern linux, signalfd can be used to convert sigchld into an event on a
file descriptor. Looks like just what is wanted for processProtocol.
There is also a python interface here:
https://launchpad.net/python-signalfd/+download
This test seems to work for me:
import signalfd
import signal
11 matches
Mail list logo