[GRASS-dev] [GRASS GIS] #2151: g.gui.* modules which use temporal framework leave processes after exiting

GRASS GIS trac at osgeo.org
Wed Jan 1 18:55:27 PST 2014


#2151: g.gui.* modules which use temporal framework leave processes after exiting
--------------------------------------------+-------------------------------
 Reporter:  annakrat                        |       Owner:  grass-dev@…              
     Type:  defect                          |      Status:  new                      
 Priority:  normal                          |   Milestone:  7.0.0                    
Component:  Python                          |     Version:  svn-trunk                
 Keywords:  g.gui.animation, temporal, RCP  |    Platform:  Linux                    
      Cpu:  All                             |  
--------------------------------------------+-------------------------------

Comment(by annakrat):

 I just tried this python
 [http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-
 way/ recipe] and it worked for me, the processes are terminated. I tried
 to find the difference and it seems that just this line is enough (in the
 GuiModuleMain function):

 {{{
 --- core/utils.py       (revision 58561)
 +++ core/utils.py       (working copy)
 @@ -1064,7 +1064,8 @@
          child_pid = os.fork()
          if child_pid == 0:
              mainfn()
 -        os._exit(0)
 +        else:
 +            os._exit(0)
      else:
          mainfn()

 }}}

 Can I apply it safely or can it cause some other troubles?

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



More information about the grass-dev mailing list