[Swift-commit] r7386 - branches/release-0.95/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sun Dec 8 08:38:58 CST 2013


Author: davidk
Date: 2013-12-08 08:38:58 -0600 (Sun, 08 Dec 2013)
New Revision: 7386

Modified:
   branches/release-0.95/bin/swift
Log:
Fix return status


Modified: branches/release-0.95/bin/swift
===================================================================
--- branches/release-0.95/bin/swift	2013-12-08 14:38:38 UTC (rev 7385)
+++ branches/release-0.95/bin/swift	2013-12-08 14:38:58 UTC (rev 7386)
@@ -170,6 +170,7 @@
 
 ### EXECUTE ############
 # Note: killing Swift may be briefly delayed due to Coasters shutdown
+return_code=0
 if test -n "$CYGWIN"; then
     set CLASSPATHSAVE=$CLASSPATH
     export CLASSPATH="$LOCALCLASSPATH"
@@ -178,11 +179,12 @@
 else
     if [ -n "$SWIFTOUTLOG" ] && [ -w "$( dirname $SWIFTOUTLOG )" ]; then
        eval java ${OPTIONS} ${COG_OPTS} -classpath ${LOCALCLASSPATH} ${EXEC} ${CMDLINE} 2>&1 | tee $SWIFTOUTLOG
+       return_code=${PIPESTATUS[0]}
     else
        eval java ${OPTIONS} ${COG_OPTS} -classpath ${LOCALCLASSPATH} ${EXEC} ${CMDLINE}
+       return_code=$?
    fi
 fi
-return_code=$?
 
 if [ "$SWIFT_USAGE_STATS" = 1 ]; then
 	$BASH -c "echo $KEY $USERID $SCRIPTID $SCRIPTLENGTH $return_code 1 > /dev/udp/$LISTENER/$PORT" > /dev/null 2>&1 &




More information about the Swift-commit mailing list