示例#1
0
    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)
示例#2
0
    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()