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
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)
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)