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

tga at ci.uchicago.edu tga at ci.uchicago.edu
Mon Jan 9 22:05:20 CST 2012


Author: tga
Date: 2012-01-09 22:05:20 -0600 (Mon, 09 Jan 2012)
New Revision: 5495

Modified:
   SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh
Log:
Retain user umask

Modified: SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh
===================================================================
--- SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh	2012-01-09 18:29:07 UTC (rev 5494)
+++ SwiftApps/SwiftR/Swift/exec/EvalRBatchPersistent.sh	2012-01-10 04:05:20 UTC (rev 5495)
@@ -7,7 +7,9 @@
 # Set restrictive umask for duration of script
 # This value prevents any other users from reading
 # or writing
-umask "077"
+DEFAULT_UMASK=077
+USER_UMASK=$(umask)
+umask $DEFAULT_UMASK
 
 #if [ $# != 4 ]; then
 if [ $# -lt 4 ]; then
@@ -90,10 +92,13 @@
   echo R_LIBS_USER= $R_LIBS_USER
 
   slotdir=$1
+  
   # Use R instead of Rscript due to Rscript issues on some
   # platforms (e.g. cray xt)
+  umask $USER_UMASK
   R --slave --no-restore --file=$RServerScript \
                 --args $slotdir >> $slotdir/R.log 2>&1 &   # launch R server
+  umask $DEFAULT_UMASK
   RPID=$!
   echo $RPID > $SLOTDIR/R.pid
   echo "$0: INFO: Launched $RServerScript $slotdir Rscript"




More information about the Swift-commit mailing list