[GRASS-SVN] r62650 - in grass/branches/releasebranch_7_0: . gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 6 19:25:20 PST 2014
Author: annakrat
Date: 2014-11-06 19:25:20 -0800 (Thu, 06 Nov 2014)
New Revision: 62650
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py
Log:
wxGUI: change GuiModuleMain implementation, calls simply main() instead of forking new process because it was not stable and not working on Windows and Mac (merge from trunk, r62649)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:61096,62179-62180,62182,62403,62422,62424,62437,62466,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575,62597,62603,62606,62609,62614,62618,62632,62642
+ /grass/trunk:61096,62179-62180,62182,62403,62422,62424,62437,62466,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575,62597,62603,62606,62609,62614,62618,62632,62642,62649
Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py 2014-11-07 03:23:40 UTC (rev 62649)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/utils.py 2014-11-07 03:25:20 UTC (rev 62650)
@@ -1046,34 +1046,12 @@
def GuiModuleMain(mainfn):
"""!Main function for g.gui.* modules
-
- Note: os.fork() is supported only on Unix platforms
-
- @todo: Replace os.fork() by multiprocessing (?)
-
- @param module's main function
+
+ os.fork removed in r62649 as fragile
"""
- if sys.platform != 'win32':
- # launch GUI in the background
- child_pid = os.fork()
- if child_pid == 0:
- # To become the session leader of this new session and the process group
- # leader of the new process group, we call os.setsid(). The process is
- # also guaranteed not to have a controlling terminal.
- os.setsid()
- mainfn()
- else:
- # exit() or _exit()?
- # _exit is like exit(), but it doesn't call any functions registered
- # with atexit (and on_exit) or any registered signal handlers. It also
- # closes any open file descriptors. Using exit() may cause all stdio
- # streams to be flushed twice and any temporary files may be unexpectedly
- # removed. It's therefore recommended that child branches of a fork()
- # and the parent branch(es) of a daemon use _exit().
- os._exit(0) # Exit parent of the child.
- else:
- mainfn()
+ mainfn()
+
def PilImageToWxImage(pilImage, copyAlpha = True):
"""!Convert PIL image to wx.Image
More information about the grass-commit
mailing list