[Zodb-checkins] SVN: zdaemon/trunk/ - Fixed: programs started with zdaemon couldn't, themselves, invoke

jim cvs-admin at zope.org
Tue Jul 10 18:05:23 UTC 2012


Log message for revision 127309:
  - Fixed: programs started with zdaemon couldn't, themselves, invoke
    zdaemon.
  
  really
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===================================================================
--- zdaemon/trunk/CHANGES.txt	2012-07-10 16:46:05 UTC (rev 127308)
+++ zdaemon/trunk/CHANGES.txt	2012-07-10 18:05:19 UTC (rev 127309)
@@ -2,12 +2,17 @@
 Change log
 ==========
 
-3.0.2 (2012-07-10)
+3.0.3 (2012-07-10)
 ==================
 
 - Fixed: programs started with zdaemon couldn't, themselves, invoke
   zdaemon.
 
+3.0.2 (2012-07-10)
+==================
+
+Fail :(
+
 3.0.1 (2012-06-08)
 ==================
 

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===================================================================
--- zdaemon/trunk/src/zdaemon/tests/tests.py	2012-07-10 16:46:05 UTC (rev 127308)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py	2012-07-10 18:05:19 UTC (rev 127309)
@@ -42,6 +42,10 @@
     with open(name, 'w') as f:
         f.write(text)
 
+def read(name):
+    with open(name) as f:
+        return f.read()
+
 def make_sure_non_daemon_mode_doesnt_hang_when_program_exits():
     """
     The whole awhile bit that waits for a program to start
@@ -243,6 +247,27 @@
     daemon process stopped
     """
 
+def DAEMON_MANAGER_MODE_leak():
+    """
+    Zdaemon used an environment variable to flag that it's running in
+    daemon-manager mode, as opposed to UI mode.  If this environment
+    variable is allowed to leak to the program, them the program will
+    be unable to invoke zdaemon correctly.
+
+    >>> write('c', '''
+    ... <runner>
+    ...   program env
+    ...   transcript t
+    ... </runner>
+    ... ''')
+
+    >>> system('./zdaemon -b0 -T1 -Cc start', quiet=True)
+    Failed: 1
+    >>> 'DAEMON_MANAGER_MODE' not in read('t')
+    True
+    """
+
+
 def setUp(test):
     test.globs['_td'] = td = []
     here = os.getcwd()

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===================================================================
--- zdaemon/trunk/src/zdaemon/zdctl.py	2012-07-10 16:46:05 UTC (rev 127308)
+++ zdaemon/trunk/src/zdaemon/zdctl.py	2012-07-10 18:05:19 UTC (rev 127309)
@@ -603,6 +603,7 @@
         args = sys.argv[1:]
 
     if os.environ.get('DAEMON_MANAGER_MODE'):
+        del os.environ['DAEMON_MANAGER_MODE']
         import zdaemon.zdrun
         return zdaemon.zdrun.main(args)
 



More information about the Zodb-checkins mailing list