[GRASS5] GRASS 5 and sockets: default?

Justin Hickey jhickey at hpcc.nectec.or.th
Wed Feb 21 01:59:27 EST 2001


Hi Markus, Eric

Markus Neteler wrote:
> > Well, for some reason I see tcltkgrass has a "d.mon start=$mon" 
> > followed by a "d.mon stop=$mon".  I'm not sure why it's set-up like
> > this...
> >
> > In src/tcltkgrass/main/gui.tcl:
> >
> > proc stop_monitors {} {
> >     foreach monitor [search_xdrivers] {
> >         exec d.mon start=$monitor >& /dev/null
> >         exec d.mon stop=$monitor >& /dev/null
> >         script_add "d.mon start=$monitor >& /dev/null" "cmd"
> >         script_add "d.mon stop=$monitor >& /dev/null" "cmd"
> >     }
> > }
> >
> > Since it's run without a controlling tty, and the monitor is already
> > running when d.mon is asked to start it again, you get an error 
> > message in your mailbox from d.mon...
> >
> > Anybody want to hit me with a clue stick as to why tcltkgrass would
> > first try to start the monitor? only to kill it?
> 
> Eric,
> 
> just guessing:
> 
> In case you have running x3 only, the "for" loop would try to
> close x0 (crash), x1 (crash), x2 (crash), x3 (o.k.) etc.
> As d.mon -L is running now, we could use this to find the
> running monitors. d.mon -L was failing with fifos (at least on Linux).

Well I looked at the code and the search_xdrivers procedures is a list
of monitors that are currently open, based on a call to "xlsclients -l".
Thus, this list should only contain monitors that are open, unless for
some reason, the connection (socket, fifo, ipc) was closed and the
window was left open. Therefore, I don't see any reason for the start
commands and I think it should be changed to

proc stop_monitors {} {
    foreach monitor [search_xdrivers] {
        exec d.mon stop=$monitor >& /dev/null
        script_add "d.mon stop=$monitor >& /dev/null" "cmd"
    }
}

This seems to work on my machine using sockets. The "close all x
monitors" option for quit worked well, but the
Config->Monitors->stop->x0 menu option seemed to take a long time. Of
course this change is also necessary for the stop_monitor procedure.

Anyway, what do you think?

-- 
Sincerely,

Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do.  ---Anonymous

Jazz and Trek Rule!!!
==================================================================

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list