Change in vdsm[master]: signals: Handle signals to non-main threads

nsoffer at redhat.com nsoffer at redhat.com
Mon Oct 20 12:32:51 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: signals: Handle signals to non-main threads
......................................................................


Patch Set 15:

(2 comments)

http://gerrit.ovirt.org/#/c/29392/15/lib/vdsm/sigutils.py
File lib/vdsm/sigutils.py:

Line 96:     except select.error as e:
Line 97:         if e[0] == errno.EINTR:
Line 98:             interrupted = True
Line 99:         else:
Line 100:             logging.exception('Received error while waiting for signal')
> Agree about raising exceptions we do not expect to recover from, will chang
cleanup = _signal_poller.poll(timeout) != []

Is nicer.

If you like to keep the timeout I cannot stop you :-)
Line 101: 
Line 102:     if events or interrupted:
Line 103:         _empty_pipe(_signal_read_fd)
Line 104: 


Line 102:     if events or interrupted:
Line 103:         _empty_pipe(_signal_read_fd)
Line 104: 
Line 105: 
Line 106: def _read(fd, len):
> I do not believe there is right or wrong here
Sure, this is just make it easier to read code, when you drill down, instead of jumping around.
Line 107:     """
Line 108:     Read that handles recoverable exceptions.
Line 109:     """
Line 110:     while True:


-- 
To view, visit http://gerrit.ovirt.org/29392
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5dbcd00cec22ef12f2b6253b016dcbd0aa889583
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list