Nir Soffer has posted comments on this change.

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


Patch Set 2: Code-Review+1

(2 comments)

Perfect

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

Line 37: 
Line 38:     This function has to be called from the main thread.
Line 39:     '''
Line 40: 
Line 41:     global _signalPoller
Extra blank line here would be nicer if you happen to have another version.
Line 42:     if _signalPoller is None:
Line 43:         read_fd, write_fd = os.pipe()
Line 44: 
Line 45:         # The write end is going to be written to from a c-level signal


Line 71: 
Line 72:     poller = _getSignalPoller()
Line 73:     try:
Line 74:         events = poller.poll()
Line 75:         for (fd, event) in events:
Parenthesis are not needed here.
Line 76:             if event & select.POLLIN:
Line 77:                 os.read(fd, 128)
Line 78:     except select.error as e:
Line 79:         # Log all error except EINTR


-- 
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: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to