diff options
Diffstat (limited to 'qarsh.c')
-rw-r--r-- | qarsh.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -292,16 +292,20 @@ run_remote_cmd(char *cmdline) &pselect_sigmask); if (nset == 0) { - if (cmd_finished && c_out == 0 && c_err == 0) break; - - if (!hbeat(qarsh_hb)) { + if (cmd_finished) { + /* we don't want to check the heartbeat, just + * the output sockets */ + if (c_out == 0 && c_err == 0) break; + } else if (!hbeat(qarsh_hb)) { /* Set our return packet as NULL so we exit * with unknown error. */ qp = NULL; break; - } - - continue; + } else { + /* No output to process, the command is + * still running, and the host is still up */ + continue; + } } if (nset == -1 && errno == EINTR) { |