From: Brian Warner Date: Sat, 15 Sep 2007 03:16:57 +0000 (-0700) Subject: check-memory: if the child process fails to start, shut down instead of hanging forever X-Git-Tag: allmydata-tahoe-0.6.0~114 X-Git-Url: https://git.rkrishnan.org/rgr-080307.php?a=commitdiff_plain;h=32f25f33e3f3fb4b4110c57f3c7a515746542840;p=tahoe-lafs%2Ftahoe-lafs.git check-memory: if the child process fails to start, shut down instead of hanging forever --- diff --git a/src/allmydata/test/check_memory.py b/src/allmydata/test/check_memory.py index 2d82f664..3ffa3d14 100644 --- a/src/allmydata/test/check_memory.py +++ b/src/allmydata/test/check_memory.py @@ -183,6 +183,8 @@ this file are ignored. # control.furl file to appear. furl_file = os.path.join(clientdir, "control.furl") def _check(): + if pp.ended: + raise RuntimeError("process ended while waiting for startup") return os.path.exists(furl_file) d = self.poll(_check, 0.1) # once it exists, wait a moment before we read from it, just in case @@ -333,11 +335,14 @@ this file are ignored. class ClientWatcher(protocol.ProcessProtocol): + ended = False def outReceived(self, data): print "OUT:", data def errReceived(self, data): print "ERR:", data def processEnded(self, reason): + print "PROCESSENDED", reason + self.ended = True self.d.callback(None)