Skip to content

Commit

Permalink
Merge pull request #3433 from hjoliver/remote-subproc-stdin
Browse files Browse the repository at this point in the history
Fix remote tidy subprocess call.
  • Loading branch information
kinow authored Nov 10, 2019
2 parents 106c679 + 0f17b9c commit b7a3de9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ never transient, and in practice job polling is the only way to recover).
[#3409](https://github.com/cylc/cylc-flow/pull/3409) - prevent cylc-run from
creating directories when executed for suites that do not exist.

[#3433](https://github.com/cylc/cylc-flow/pull/3433) - fix server abort at
shutdown during remote run dir tidy (introduced during Cylc 8 development).

-------------------------------------------------------------------------------
## __cylc-8.0a1 (2019-09-18)__

Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run_cmd(command, stdin=None, capture_process=False, capture_status=False,
command inclusive of all opts and args required to run via ssh.
stdin (file):
If specified, it should be a readable file object.
If None, `open(DEVNULL)` is set if output is to be captured.
If None, DEVNULL is set if output is to be captured.
capture_process (boolean):
If True, set stdout=PIPE and return the Popen object.
capture_status (boolean):
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/task_remote_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def remote_tidy(self):
cmd.append(get_remote_suite_run_dir(host, owner, self.suite))
procs[(host, owner)] = (
cmd,
Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=open(DEVNULL)))
Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=DEVNULL))
# Wait for commands to complete for a max of 10 seconds
timeout = time() + 10.0
while procs and time() < timeout:
Expand Down

0 comments on commit b7a3de9

Please sign in to comment.