Opened 11 years ago

Closed 11 years ago

#2287 closed defect (fixed)

MONITOR_*_(ENV|CMD|MAP)FILE variables

Reported by: hcho Owned by: grass-dev@…
Priority: major Milestone: 7.0.0
Component: Display Version: svn-releasebranch70
Keywords: d.mon, g.gisenv Cc:
CPU: x86-64 Platform: Linux

Description

I tried to get the MONITOR_wx0_CMDFILE variable from $GISRC with g.gisenv, but the variable name was automatically converted to uppercase with a warning "GRASS variable must be uppercase." and G_getenv couldn't find it of course. These MONITOR_*_*FILE variables have to be renamed to all uppercase according to the g.gisenv warning. Or mixed case should be allowed to be able to get MONITOR_* variables from the command line.

Change History (2)

comment:1 by neteler, 11 years ago

Keywords: d.mon added
Version: unspecifiedsvn-releasebranch70

The related code seems to be here (rough "grep"):

grep MONITO * | grep '_'
list.c:    G_asprintf(&env_name, "MONITOR_%s_ENVFILE", name);
list.c:    G_asprintf(&cmd_name, "MONITOR_%s_CMDFILE", name);
main.c:	mon = G__getenv("MONITOR");
main.c:		G_unsetenv("MONITOR");
select.c:    curr_mon = G__getenv("MONITOR");
select.c:	G_setenv("MONITOR", name);
start.c:    G_asprintf(&env_name, "MONITOR_%s_MAPFILE", name);
start.c:    G_asprintf(&env_name, "MONITOR_%s_MAPFILE", name);
start.c:    curr_mon = G__getenv("MONITOR");
start.c:    G_asprintf(&env_name, "MONITOR_%s_ENVFILE", name);
start.c:    G_asprintf(&env_name, "MONITOR_%s_CMDFILE", name);
start.c:	G_setenv("MONITOR", name);
stop.c:    G_asprintf(&env_name, "MONITOR_%s_ENVFILE", name);
stop.c:    G_asprintf(&env_name, "MONITOR_%s_PID", name);
stop.c:    const char *env_prefix = "MONITOR_";
stop.c:    G_unsetenv("MONITOR");

comment:2 by hcho, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in r60204

Note: See TracTickets for help on using tickets.