[Swift-commit] r7385 - trunk/bin

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


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

Modified:
   trunk/bin/swift
Log:
Fix return code


Modified: trunk/bin/swift
===================================================================
--- trunk/bin/swift	2013-12-08 00:20:43 UTC (rev 7384)
+++ trunk/bin/swift	2013-12-08 14:38:38 UTC (rev 7385)
@@ -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