[CalendarServer-changes] [6072] CalendarServer/branches/users/glyph/sql-store/txdav/datastore/ subpostgres.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 11 18:43:58 PDT 2010


Revision: 6072
          http://trac.macosforge.org/projects/calendarserver/changeset/6072
Author:   sagen at apple.com
Date:     2010-08-11 18:43:56 -0700 (Wed, 11 Aug 2010)
Log Message:
-----------
Don't kill the spawned process when we see stderr output

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py

Modified: CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py	2010-08-12 01:11:00 UTC (rev 6071)
+++ CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py	2010-08-12 01:43:56 UTC (rev 6072)
@@ -197,6 +197,7 @@
         """
         Some output was received on stdout.
         """
+        print "OUTRECV", data
         self.output.append(data)
 
 
@@ -204,27 +205,17 @@
         """
         Some output was received on stderr.
         """
-        self.error.append(data)
-        # Attempt to exit promptly if a traceback is displayed, so we don't
-        # deal with timeouts.
-        lines = ''.join(self.error).split("\n")
-        if len(lines) > 1:
-            errorReportLine = lines[-2].split(": ", 1)
-            if len(errorReportLine) == 2 and ' ' not in errorReportLine[0] and '\t' not in errorReportLine[0]:
-                self.transport.signalProcess("TERM")
+        print "ERRRECV", data
+        self.output.append(data)
 
 
     def processEnded(self, why):
         """
         The process is over, fire the Deferred with the output.
         """
-        if why.check(ProcessDone) and not self.error:
-            self.deferred.callback(''.join(self.output))
-        else:
-            self.deferred.errback(ErrorOutput(''.join(self.error)))
+        self.deferred.callback(''.join(self.output))
 
 
-
 class PostgresService(MultiService):
 
     def __init__(self, dataStoreDirectory, subServiceFactory,
@@ -414,6 +405,7 @@
                 os.chown(self.dataStoreDirectory.path, self.uid, self.gid)
                 os.chown(workingDir.path, self.uid, self.gid)
             dbInited = Deferred()
+            print "RUNNING INITDB", initdb, env, workingDir.path, self.uid, self.gid
             reactor.spawnProcess(
                 CapturingProcessProtocol(dbInited, None),
                 initdb, [], env, workingDir.path,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100811/b9187c83/attachment-0001.html>


More information about the calendarserver-changes mailing list