Commit fa6924f9 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fix bug: when memory leak occurs with openoffice.org, sometimes xvfb stop too....

fix bug: when memory leak occurs with openoffice.org, sometimes xvfb stop too. So, to fix it was needed check if xvfb is started.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@37679 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee393c0a
......@@ -33,6 +33,7 @@ from threading import Lock
from cloudooo.ooolib import setUpUnoEnvironment
from zope.interface import implements
from application import Application
from xvfb import xvfb
from cloudooo.interfaces.lockable import ILockable
from cloudooo.utils import logger, waitStartDaemon,\
removeDirectory, waitStopDaemon, convertStringToBool
......@@ -108,6 +109,8 @@ class OpenOffice(Application):
def start(self):
"""Start Instance."""
if not xvfb.status():
xvfb.restart()
self.path_user_installation = join(self.path_run_dir, \
"cloudooo_instance_%s" % self.port)
if exists(self.path_user_installation):
......
......@@ -30,6 +30,7 @@ import jsonpickle
from os import environ
from subprocess import Popen, PIPE
from cloudooo.application.openoffice import openoffice
from cloudooo.application.xvfb import xvfb
from zope.interface import implements
from cloudooo.interfaces.handler import IHandler
from cloudooo.mimemapper import mimemapper
......@@ -111,6 +112,7 @@ class OOHandler:
def _callUnoConverter(self, *feature_list, **kw):
""" """
if not openoffice.status():
xvfb.restart()
openoffice.start()
command = self._getCommand(*feature_list, **kw)
stdout, stderr = self._subprocess(command)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment