[Erp5-report] r37858 luke - in /erp5/trunk/utils/erp5.recipe.mysqlserver: ./ src/erp5/recip...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 17 10:41:52 CEST 2010


Author: luke
Date: Tue Aug 17 10:41:50 2010
New Revision: 37858

URL: http://svn.erp5.org?rev=37858&view=rev
Log:
 - use os.execl and replace current process to avoid not needed running process
Thanks to this wrapper will be replaced by wrapped process, and killing it
will be much easier.
Please see: http://docs.python.org/library/os.html#os.execl

Modified:
    erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt
    erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/ctl.py

Modified: erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt?rev=37858&r1=37857&r2=37858&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.mysqlserver/CHANGES.txt [utf8] Tue Aug 17 10:41:50 2010
@@ -3,7 +3,8 @@ Changelog
 
 unrelased (unrelased)
 ---------------------
-
+- use os.execl and replace current process to avoid not needed running process.
+  [Lukasz Nowak]
 - Add doctest based buildout testing reusing buildout testing API.
   [Lukasz Nowak]
 

Modified: erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/ctl.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/ctl.py?rev=37858&r1=37857&r2=37858&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/ctl.py [utf8] (original)
+++ erp5/trunk/utils/erp5.recipe.mysqlserver/src/erp5/recipe/mysqlserver/ctl.py [utf8] Tue Aug 17 10:41:50 2010
@@ -13,14 +13,12 @@
 #
 ##############################################################################
 
-#
-# Draft script to wrapper mysql programs calls.
-# This script can be improved to provide more features
-# in future.
-#
+from os import execl
+import sys
 
-from subprocess import call as main
+def main(args):
+  sys.stdout.flush()
+  execl(args[0], args[0], *args[1:])
 
 if __name__ == "__main__":
-  import sys
-  main(sys.argv[1:])
+  main(*sys.argv[1:])




More information about the Erp5-report mailing list