Python subprocess.run CalledProcessError while running rsh

104 views Asked by At

I am running a script on a remote machine as:

subprocess.run(
    ["rsh", self.target] + shlex.split(cmd),
    check=True
)

The command always runs successfully on the remote machine, but as soon as it finishes on the remote machine, I get a CalledProcessError with

 Command 'cmd' died with <Signals.SIGPIPE: 13>.

This behavior is not consistent and doesn't happen everytime (the other times the subprocess exits without any exception as expected). I'm wondering what might be the issue here, and how to fix it?

0

There are 0 answers