[Twisted-Python] Exit code using twistd
Miguel Filho
miguel.filho at gmail.com
Tue Apr 29 22:30:32 MDT 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?
> http://twistedmatrix.com/projects/core/documentation/howto/application.html
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
the script.
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.
Regards,
Miguel
More information about the Twisted-Python
mailing list