[Swift-commit] r4029 - SwiftApps/SwiftR/Swift/exec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Jan 22 12:19:08 CST 2011


Author: tga
Date: 2011-01-22 12:19:07 -0600 (Sat, 22 Jan 2011)
New Revision: 4029

Modified:
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Bugfix to R worker cleeanup logic, should work correctly now and avoid
trying to kill process multiple times.


Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2011-01-21 21:30:05 UTC (rev 4028)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2011-01-22 18:19:07 UTC (rev 4029)
@@ -406,9 +406,10 @@
     # Find and terminate R workers: they should register their PiD
     # in a standard location based on the pid of this start-swift
     # script
-    for pidfile in ../Rworkers/worker.$$/*/R.pid
+    for rwork in `(shopt -s nullglob; echo ../Rworkers/worker.$$/*/)`
     do
-        kill `cat $pidfile` &> /dev/null
+        kill `cat $rwork/R.pid` &> /dev/null
+        rm -rf $rwork
     done
     exit 0
   }




More information about the Swift-commit mailing list