From 71db81fe624a092b336c247a671c45106afb70ed Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Fri, 21 Dec 2018 09:14:13 +1100 Subject: qsub: capture stderr and stdout jointly --- lib/qsub.nix | 5 ++--- 1 file 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 -- cgit v1.2.3