[CalendarServer-changes] [14991] CalendarServer/trunk/txdav/base/datastore/subpostgres.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jul 24 09:47:15 PDT 2015
Revision: 14991
http://trac.calendarserver.org//changeset/14991
Author: sagen at apple.com
Date: 2015-07-24 09:47:15 -0700 (Fri, 24 Jul 2015)
Log Message:
-----------
Wrap os.kill in a try to handle the case where the process is already gone.
Modified Paths:
--------------
CalendarServer/trunk/txdav/base/datastore/subpostgres.py
Modified: CalendarServer/trunk/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/subpostgres.py 2015-07-24 00:31:11 UTC (rev 14990)
+++ CalendarServer/trunk/txdav/base/datastore/subpostgres.py 2015-07-24 16:47:15 UTC (rev 14991)
@@ -677,8 +677,13 @@
if self._pgCtlInode != newInode:
# send SIGTERM to postgres
+ log.info("Postgres control script mismatch")
if self._postgresPid:
- os.kill(self._postgresPid, signal.SIGTERM)
+ log.info("Sending SIGTERM to Postgres")
+ try:
+ os.kill(self._postgresPid, signal.SIGTERM)
+ except OSError:
+ pass
return succeed(None)
else:
# use pg_ctl stop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150724/f6ca3f74/attachment-0001.html>
More information about the calendarserver-changes
mailing list