![](https://secure.gravatar.com/avatar/c8f4d4d1a8fc53c13ed05c202e0257fe.jpg?s=120&d=mm&r=g)
24 May
2007
24 May
'07
11:04 a.m.
"JP" == Jean-Paul Calderone <exarkun@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 using __import__. Is it right that all the -n switch to twistd does is prevent the fork? Terry