Пример #1
0
 def __init__(self, command, arguments, environment=None, stdout=None):
     self.__command = command
     log.debug('%s %s', command, ' '.join(arguments))
     self.__process = Popen([command]+arguments, executable=command,
                            cwd=os.getcwd(), env=environment,
                            stdout=stdout, stderr=subprocess.STDOUT,
                            preexec_fn=os.setpgrp)
Пример #2
0
 def __init__(self, command, arguments, environment=None, stdout=None):
     self.__terminateRequested = False
     self.__command = command
     self.__arguments = arguments
     log.debug('%s %s', command, ' '.join(arguments))
     self.__process = Popen([command] + arguments,
                            executable=command,
                            cwd=os.getcwd(),
                            env=environment,
                            stdout=stdout,
                            stderr=subprocess.STDOUT,
                            preexec_fn=os.setpgrp)
     self.__tracker = threading.Thread(target=self.monitorChild)
     self.__tracker.daemon = True
     self.__tracker.start()
Пример #3
0
 def __init__(self, command, arguments, environment=None, stdout=None):
     self.__terminateRequested = False
     self.__command = command
     self.__arguments = arguments
     log.debug('%s %s', command, ' '.join(arguments))
     self.__process = Popen([command] + arguments,
                            executable=command,
                            cwd=os.getcwd(),
                            env=environment,
                            stdout=stdout,
                            stderr=subprocess.STDOUT,
                            preexec_fn=os.setpgrp)
     self.__tracker = None
     self.__callback = None
     self.__children = []