[Twisted-web] Different behavior of twistd with and without -n
exarkun at divmod.com
Thu May 24 13:44:52 EDT 2007
On Thu, 24 May 2007 18:04:57 +0200, Terry Jones <terry at jon.es> wrote:
>>>>>> "JP" == Jean-Paul Calderone <exarkun at divmod.com> writes:
>JP> A completely wild guess is that forking is confusing PyLucene in a
>JP> fatal way. Are you importing PyLucene in the .tac file itself? If so,
>JP> it may help to avoid doing this, so that no code from PyLucene even
>JP> gets a chance to run until after the process has already daemonized.
>Hi JP. Thanks for the suggestion.
>Yes, the PyLucene import does happen as a result of an import in the .tac
>file. I just made some changes to delay the import until PyLucene is
>actually needed. That didn't work, and nor did further hiding the import by
>Is it right that all the -n switch to twistd does is prevent the fork?
It does a couple other minor things, like changing the default logging to
go to stdout instead of twistd.log, but preventing the fork is the only big
More information about the Twisted-web