def call(self, cmd, shell=True, fg=True): """Execute a command cmd - The command to be executed. shell - If true execute the command in a shell. fg - If true execute the command in foreground. """ with block_signal(): self._call(cmd, shell, fg) self._wait(False)
def call(self, cmd, shell=True, fg=True): """Execute a command Check RootNS.call. """ if not self.main.is_alive(): raise RuntimeError("Remote process is dead") with block_signal(): self.queue.put((EXECUTE, cmd, shell, fg)) self.queue.join()