[GRASS-dev] [grass-code I][355] A lot of <defunct> processes around while working

Michael Barton michael.barton at asu.edu
Wed Apr 4 15:20:06 EDT 2007


Thanks. This is easily fixable.

Michael


On 4/4/07 12:06 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>>>> frankie   5484     1  2 16:49 pts/11   00:00:32 wish
>>>> /usr/lib/grass/etc/gm/gm.tcl -name gm_tcl
>>>> frankie   5525  5484  0 16:49 pts/11   00:00:00 [g.region] <defunct>
>>>> frankie   5527  5484  0 16:50 pts/11   00:00:00 [g.region] <defunct>
>>>> frankie   5529  5484  0 16:50 pts/11   00:00:00 [g.region] <defunct>
>>> 
>>> [snip]
>>> 
>>> AFAICT, this is due to MapCanvas::set_wind; it should be using "exec"
>>> rather than "open |...".
>> 
>> This is because of the need to run g.region -gp and read the results back,
>> in order to get current region information.
> 
> Nope. The code in question is:
> 
> proc MapCanvas::set_wind {mon args overwrite} {
> variable zoom_attrs
> global devnull
> 
> set values [MapCanvas::currentzoom $mon]
> 
> set options {}
> foreach attr $zoom_attrs value $values {
> if {$attr != "rows" && $attr != "cols"} {
> lappend options "$attr=$value"
> }  
> }
> 
> if {$overwrite == 1} {
> open [concat "|g.region --o" $options $args "2> $devnull"]
> } else {
> open [concat "|g.region" $options $args "2> $devnull"]
> }
> }
> 
> Nothing is using the returned descriptor. More importantly, nothing is
> closing it, so the process will remain a zombie forever.
> 
> This should be using exec, not open.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list