[GRASS-dev] gis.m/d.m don't background on OSX

The recent change to init.sh to not explicitly background doesn't appear to work on OSX (X11 build).

if [ "$osxaqua" ] ; then
  "$GISBASE/scripts/gis.m" | sh &
else
  "$GISBASE/scripts/gis.m"
fi

An Aqua build still explicitly backgrounds, but not an X11 build. And the backgrounding within gis.m/d.m doesn't happen.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

William Kyngesburye wrote:

The recent change to init.sh to not explicitly background doesn't
appear to work on OSX (X11 build).

if [ "$osxaqua" ] ; then
  "$GISBASE/scripts/gis.m" | sh &
else
  "$GISBASE/scripts/gis.m"
fi

An Aqua build still explicitly backgrounds, but not an X11 build.
And the backgrounding within gis.m/d.m doesn't happen.

I made that change as the d.m and gis.m scripts background themselves:

gui/tcltk/gis.m/gis.m:
-----------------------
[...]
if [ $# -eq 0 ] ; then
        if [ "$HOSTTYPE" = "macintosh" -o "$HOSTTYPE" = "powermac" -o "$HOSTTYPE" = "powerpc" -o "$HOSTTYPE" = "intel-pc" ] ; then
                exec "$GRASS_WISH" $GISBASE/etc/gm/gm.tcl -name gm_tcl
        else
                exec "$GRASS_WISH" $GISBASE/etc/gm/gm.tcl -name gm_tcl &
        fi
        exit
fi

if [ "$1" != "@ARGS_PARSED@" ] ; then
  exec g.parser "$0" "$@"
fi

exec "$GRASS_WISH" "$GISBASE/etc/gm/gm.tcl" -name gm_tcl "$GIS_OPT_GRC" sh &

-----------------------

gui/tcltk/d.m/d.m is much the same.

before randomly adding "&" back in, I'd like to understand why it fails.
These platform tests seems slighly messy to me.

Hamish

On Dec 17, 2006, at 5:08 PM, Hamish wrote:

I made that change as the d.m and gis.m scripts background themselves:

gui/tcltk/gis.m/gis.m:
-----------------------
[...]
if [ $# -eq 0 ] ; then
        if [ "$HOSTTYPE" = "macintosh" -o "$HOSTTYPE" = "powermac" -o "$HOSTTYPE" = "powerpc" -o "$HOSTTYPE" = "intel-pc" ] ; then
                exec "$GRASS_WISH" $GISBASE/etc/gm/gm.tcl -name gm_tcl
        else
                exec "$GRASS_WISH" $GISBASE/etc/gm/gm.tcl -name gm_tcl &
        fi
        exit
fi

But according to the logic there, it doesn't explicitly background on OSX ("macintosh", "powermac", "powerpc"). And apparently exec doesn't automatically background on OS X (the problem I noticed).

So maybe now the Mac exceptions in gis.m/d.m should be removed?

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy