commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8152 - trunk/gnue-common/src/apps


From: johannes
Subject: [gnue] r8152 - trunk/gnue-common/src/apps
Date: Mon, 6 Feb 2006 10:34:19 -0600 (CST)

Author: johannes
Date: 2006-02-06 10:34:19 -0600 (Mon, 06 Feb 2006)
New Revision: 8152

Modified:
   trunk/gnue-common/src/apps/GServerApp.py
Log:
Create directory for pidfile if necessary


Modified: trunk/gnue-common/src/apps/GServerApp.py
===================================================================
--- trunk/gnue-common/src/apps/GServerApp.py    2006-02-06 13:57:57 UTC (rev 
8151)
+++ trunk/gnue-common/src/apps/GServerApp.py    2006-02-06 16:34:19 UTC (rev 
8152)
@@ -66,7 +66,7 @@
     GBaseApp.__init__(self, connections, application, defaults)
 
     if not self.OPTIONS ['foreground']:
-      if os.name == 'posix':
+      if os.name == 'posix':
         self.__removeStaleFile ()
         self.__createPidFile (0)
 
@@ -181,6 +181,10 @@
     @param pid: Process id to store in the pid file
     """
 
+    piddir = os.path.dirname (self.OPTIONS ['pidfile'])
+    if not os.path.exists (piddir):
+      os.makedirs (piddir)
+
     pidfile = open (self.OPTIONS ['pidfile'], 'w')
     pidfile.write ("%s%s" % (pid, os.linesep))
     pidfile.close ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]