[GRASS-SVN] r39479 - grass/branches/develbranch_6/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 11 01:39:26 EDT 2009


Author: hamish
Date: 2009-10-11 01:39:25 -0400 (Sun, 11 Oct 2009)
New Revision: 39479

Modified:
   grass/branches/develbranch_6/lib/init/init.sh
Log:
don't delay if wish isn't running

Modified: grass/branches/develbranch_6/lib/init/init.sh
===================================================================
--- grass/branches/develbranch_6/lib/init/init.sh	2009-10-10 20:51:26 UTC (rev 39478)
+++ grass/branches/develbranch_6/lib/init/init.sh	2009-10-11 05:39:25 UTC (rev 39479)
@@ -1022,12 +1022,13 @@
 
 # Attempt to close any open gis.m instances. 
 # Will work only on some systems, still has no harm to others
-if [ $TCLTKGRASSBASE ] ; then
+# do Mac and MSys have pgrep? if [ -x `which pgrep` ] && [ `pgrep -c  ... ] ; then
+if [ -n "$TCLTKGRASSBASE" ] && [ `pgrep -c $GRASS_WISH` -ge 1 ] ; then
 	echo "Closing open gis.m sessions....."
 	echo 'foreach gwin [lsearch -all -inline [winfo interps] gm_tcl*] {
 		catch {send -async $gwin Gm::remoteExit $env(GIS_LOCK)}
 	}
-	exit' | $GRASS_WISH >/dev/null 2>&1
+	exit' | "$GRASS_WISH" #>/dev/null 2>&1
 fi
 
 echo "Cleaning up temporary files ..."



More information about the grass-commit mailing list