[Checkins] SVN: z3c.recipe.ldap/trunk/z3c/recipe/ldap/ Don't exit
the control script until the pidfile indicates we should
Ross Patterson
me at rpatterson.net
Mon Dec 10 17:25:31 EST 2007
Log message for revision 82248:
Don't exit the control script until the pidfile indicates we should
Changed:
U z3c.recipe.ldap/trunk/z3c/recipe/ldap/ctl.py
U z3c.recipe.ldap/trunk/z3c/recipe/ldap/docs/README.txt
-=-
Modified: z3c.recipe.ldap/trunk/z3c/recipe/ldap/ctl.py
===================================================================
--- z3c.recipe.ldap/trunk/z3c/recipe/ldap/ctl.py 2007-12-10 22:24:53 UTC (rev 82247)
+++ z3c.recipe.ldap/trunk/z3c/recipe/ldap/ctl.py 2007-12-10 22:25:31 UTC (rev 82248)
@@ -8,10 +8,14 @@
args.extend(['-h', options['urls']])
args.extend(sys.argv[2:])
subprocess.Popen(args)
+ while not os.path.exists(options['pidfile']):
+ pass
elif command.lower() == 'stop':
pidfile = file(options['pidfile'])
pid = int(pidfile.read())
pidfile.close()
os.kill(pid, signal.SIGTERM)
+ while os.path.exists(options['pidfile']):
+ pass
else:
raise ValueError('Command %s unsupported' % command)
Modified: z3c.recipe.ldap/trunk/z3c/recipe/ldap/docs/README.txt
===================================================================
--- z3c.recipe.ldap/trunk/z3c/recipe/ldap/docs/README.txt 2007-12-10 22:24:53 UTC (rev 82247)
+++ z3c.recipe.ldap/trunk/z3c/recipe/ldap/docs/README.txt 2007-12-10 22:25:31 UTC (rev 82248)
@@ -106,10 +106,8 @@
Start the slapd server::
- >>> import time
>>> bin = join(sample_buildout, 'bin', 'slapd')
>>> print system(bin+' start'),
- >>> time.sleep(0.1)
On first run, the LDAP database is created::
@@ -128,7 +126,6 @@
Stop the slapd server::
>>> print system(bin+' stop'),
- >>> time.sleep(0.1)
When the slapd server finishes shutting down the pid file is deleted::
More information about the Checkins
mailing list