syncdaemon: fix double wait in monitor

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2816 ([glusterfs-3.2.0qa14]: gsyncd monitor crashed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2816
This commit is contained in:
Csaba Henk 2011-04-19 09:35:45 +00:00 committed by Anand Avati
parent 19e4ef605f
commit 29ac0febec

View File

@ -41,7 +41,7 @@ class Monitor(object):
cpid = os.spawnv(os.P_NOWAIT, sys.executable, argv)
time.sleep(60)
ret = nwait(cpid, os.WNOHANG)
if not ret:
if ret == None:
self.set_state('OK')
ret = nwait(cpid)
elif ret in (0, 1):