Esempio n. 1
0
    def stop(self):
        '''Stop the process'''
        logger.info('Stopping %s' % ' '.join(self._args))
        if not self._process:
            return

        self._process.terminate()
        self._process.wait()
        self._process = None
Esempio n. 2
0
    def stop(self):
        '''Stop the process'''
        logger.info('Stopping %s' % ' '.join(self._args))
        if not self._process:
            return

        self._process.terminate()
        self._process.wait()
        self._process = None
Esempio n. 3
0
 def start(self):
     '''Start the process'''
     logger.info('Spawning %s' % ' '.join(self._args))
     self._process = subprocess.Popen(self._args,
                                      bufsize=0,
                                      executable=self._path,
                                      stdin=None,
                                      stdout=open(os.devnull),
                                      stderr=open(os.devnull))
     # Wait until the process is 'live'
     while not self.ready():
         time.sleep(0.1)
Esempio n. 4
0
 def start(self):
     '''Start the process'''
     logger.info('Spawning %s' % ' '.join(self._args))
     self._process = subprocess.Popen(
         self._args,
         bufsize=0,
         executable=self._path,
         stdin=None,
         stdout=open(os.devnull),
         stderr=open(os.devnull))
     # Wait until the process is 'live'
     while not self.ready():
         time.sleep(0.1)