[Dev OpenGP] [106] comments in ogpdaemon

[ Thread Index | Date Index | More opengp.tuxfamily.org/development Archives ]


Revision: 106
Author:   nicolaf
Date:     2009-03-26 17:09:54 +0100 (Thu, 26 Mar 2009)

Log Message:
-----------
comments in ogpdaemon

Modified Paths:
--------------
    trunk/src/bin/ogpdaemon


Modified: trunk/src/bin/ogpdaemon
===================================================================
--- trunk/src/bin/ogpdaemon	2009-03-26 16:07:55 UTC (rev 105)
+++ trunk/src/bin/ogpdaemon	2009-03-26 16:09:54 UTC (rev 106)
@@ -12,6 +12,8 @@
 LOG_FILE = '/var/log/ogpdaemon.log'
 CONF_FILE = '/etc/ogpdaemon.conf'
 SOAS_FILE = '/etc/ogpdaemon.soas'
+
+
 CONF_REGEXP='^(?P<key>([a-zA-Z]\w*))\s*=\s?(?P<value>(.*))$'
 SOAS_REGEXP='^(?P<key>([^\s]*))\s*=\s?(?P<value>(.*))$'
 LOCAL_PARAMETERS = ['uri', 'dn', 'passwd']
@@ -154,7 +156,7 @@
 				logging.warning('Configuration installation for plugin %s failed with %s.' % (pluginName, sys.exc_info()[1]))
 						
 
-#initialization
+#initialization before fork
 #getting options from command line
 (reload, loglevel) = parse_opts()
 
@@ -194,12 +196,12 @@
 	logging.error("OgpDaemon: startup failed with %s" % sys.exc_info()[1])
 	exit(1)
 
+# if running as daemon, fork after initialization
 if not reload:
 	try:
 		pid = os.fork()
 	except:
 		print "totopass"
-	
 	if pid != 0:
 		print pid
 		exit(0)


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/