[GRASS5] closing down GRASS cleanly

Hamish hamish_nospam at yahoo.com
Tue Sep 16 02:55:37 EDT 2003


Hi,

Currently closing down GRASS leaves open the tcltkgrass menu and all
monitor windows. Is this wanted? I'd think exiting GRASS should clean up
all of its children behind it, but there may be good reasons not to..?

Adding this to the near-end of Init.sh shuts down the XDRIVER windows:

d.mon stop=x0 2> /dev/null
d.mon stop=x1 2> /dev/null
d.mon stop=x2 2> /dev/null
d.mon stop=x3 2> /dev/null
d.mon stop=x4 2> /dev/null
d.mon stop=x5 2> /dev/null
d.mon stop=x6 2> /dev/null

or ..

for MON in `d.mon -L | awk '{print $1 " " $5}' | grep running | \
  awk '{print $1}'` ; do
    d.mon stop=$MON
done

"d.mon stop=[CELL|HTMLMAP|PNG]" might be more important not to leave open.

Will that cause problems multi-user or multi-session?
Is adding the ability to do "d.mon stop=x0,x1,..." of any practical use?


The TclTk menu is a bit more tricky, "pkill wish" might get more than
you really wanted. Only thing I can think of is setting the tcltkgrass
PID to a shell variable somehow and close with "kill -15 $WISH_PID".
Seems unprofessional to leave the menu open.


?
Hamish




More information about the grass-dev mailing list