aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-12-21 09:14:13 +1100
committerJustin Bedo <cu@cua0.org>2018-12-21 09:14:13 +1100
commit71db81fe624a092b336c247a671c45106afb70ed (patch)
tree6d6557de0dd12a7af9c7d94cf494263bb6b63c17
parentfd497e038d6fe72cef476600496c70aa135ef297 (diff)
qsub: capture stderr and stdout jointly
-rw-r--r--lib/qsub.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/qsub.nix b/lib/qsub.nix
index a84601c..a0a5d2c 100644
--- a/lib/qsub.nix
+++ b/lib/qsub.nix
@@ -16,7 +16,7 @@
TMP=$TMPDIR
NIX_BUILD_TOP=$TMPDIR
cd $TMPDIR
- ${builder} ${lib.escapeShellArgs args} > qsub-stdout 2> qsub-stderr
+ ${builder} ${lib.escapeShellArgs args} 2>&1 > qsub-log
echo $? > qsub-exit
'';
@@ -52,8 +52,7 @@
until qstat -f ''${id%%.} 2>&1 | grep "\(Unknown Job\|job_state = C\)" > /dev/null ; do
sleep ${toString sleepTime}
done
- cat ${tmpDir}/qsub-$id/qsub-stderr >&2
- cat ${tmpDir}/qsub-$id/qsub-stdout
+ cat ${tmpDir}/qsub-$id/qsub-log
if [ -e ${tmpDir}/qsub-$id/qsub-exit ]; then
exitCode=$(cat ${tmpDir}/qsub-$id/qsub-exit)
else