[GRASS-dev] Re: [GRASS GIS] #560: WinGRASS not deleting temp ppm files from map display

GRASS GIS trac at osgeo.org
Sat Apr 18 16:47:53 EDT 2009


#560: WinGRASS not deleting temp ppm files from map display
---------------------------+------------------------------------------------
  Reporter:  isaacullah    |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect        |      Status:  new                      
  Priority:  major         |   Milestone:  6.4.0                    
 Component:  Display       |     Version:  6.4.0 RCs                
Resolution:                |    Keywords:  v.digit ppm temp         
  Platform:  MSWindows XP  |         Cpu:  x86-32                   
---------------------------+------------------------------------------------
Comment (by glynn):

 Replying to [comment:1 hamish]:
 > the only thing I can think of is that the files are still in use, so can
 not be swept up by clean_temp on exit. ?

 AFAICT, clean_temp doesn't work (at all) on Windows. See the "TODO"s in
 the code.

 clean_temp only removes files if they are owned by the current user, and
 either the PID is no longer in use or the file is more than 4 days old.

 But it cannot determine the current user on Windows (no getuid()), so it
 uses -1, but MSVCRT's stat() always reports zero for the st_uid field.
 Also, the code which checks whether a given PID is still in use always
 fails (which is handled the same as if the PID *is* in use).

 If the current user check was skipped, it should at least delete files
 more than 4 days old.

 Implementing the ownership check would be non-trivial, due to the
 complexity of the NT security model (e.g. a file can be owned by a group
 rather than a user, there's a difference between owner and creator, a
 "user" consists of both a domain and a username, etc).

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/560#comment:2>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list