metomi/rose — pull request #1080 by matthewrmshin (2014-01-06 11:22:20+00:00)
Title: rose suite-run: fix hang if prev cylc gui open

If `cylc gui` launched by the previous `rose suite-run` is still open,
the `rose suite-run` command fails, and any subsequent invocation hangs.
There are 2 problems:
1. `log/rose-suite-run.log` is still considered opened by `cylc gui`.
(It looks like the process has inherited the file handle, even though
it is launched by `nohup`). When the new `rose suite-run` tries to
remove the log directory, it is unable to do so. This change closes
the file before launching `cylc gui`.
2. Problem 1 creates a `log-DATETIME.tar.gz` file, but left
`log-DATETIME/`. On subsequent invocation of `rose suite-run`, the
`gzip` command hangs, waiting for an overwrite confirmation. This
change calls `gzip` with `-f` to force an overwrite.