'Spawn a process on a remote node
cmd: remote command to run (list)
**params: parameters to Popen()
returns: Popen() object'

def _popen(self, cmd, sudo=True, tt=True, **params):

    if (type(cmd) is str):
        cmd = cmd.split()
    if self.isRemote:
        if sudo:
            cmd = (['sudo', '-E'] + cmd)
        if tt:
            cmd = (self.sshcmd + cmd)
        else:
            sshcmd = list(self.sshcmd)
            sshcmd.remove('-tt')
            cmd = (sshcmd + cmd)
    elif (self.user and (not sudo)):
        cmd = (['sudo', '-E', '-u', self.user] + cmd)
    params.update(preexec_fn=self._ignoreSignal)
    debug('_popen', cmd, '\n')
    popen = super(RemoteMixin, self)._popen(cmd, **params)
    return popen
