[Twisted-Python] Exit code using twistd
miguel.filho at gmail.com
Wed Apr 30 00:30:32 EDT 2008
On Tue, Apr 29, 2008 at 10:54 PM, Chris Miles <miles.chris at gmail.com> wrote:
> Are you using the Twisted Application Framework to initialise your app?
Yes, I am.
> In my application, I parse the configuration file and set everything up
> before creating the service.Application and adding services.
All right, the code was much further in the process, running inside
startService and then calling sys.exit(1).
I was looking inside the code, and the service creation is executed
AFTER calling daemonize() I suppose, so my code was calling
sys.exit(1) while the process was already forked and has returned 0 to
I have moved all code to be loaded before creating any service at all
as you suggested and raising the proper exceptions. It's working fine,
thanks for the input.
More information about the Twisted-Python