This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: My PyLucene app freezes when run as a daemon



On Fri, 23 Mar 2007, David Daney wrote:


Ofer Nave wrote:
Sorry, I should stated this explicitly:

I am running on linux 2.6.9.


The version does not really matter. You cannot call fork from within a libgcj based application and use it for much of anything other than exec.


If you want to daemonize, you should do it before calling Jv_RunMain.


Jv_RunMain() is not invoked since there is no Java main in Python.


But Ofer, initVM() is the PyLucene equivalent thing here. That function calls JvCreateJavaVM() and is invoked when the PyLucene module is first imported into Python.

Hence, to follow David's advice, you need to do your daemonization tricks before actually importing PyLucene.

Andi..


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]