Yaniv Bronhaim has posted comments on this change.

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


Patch Set 20:

(2 comments)

looks good to me, although I agree with nir's suggestion regarding cleaning the 
pipe

http://gerrit.ovirt.org/#/c/29392/20/lib/vdsm/infra/sigutils/__init__.py
File lib/vdsm/infra/sigutils/__init__.py:

Line 45:         raise RuntimeError('register was already called')
Line 46: 
Line 47:     read_fd, write_fd = os.pipe()
Line 48: 
Line 49:     # The write end is going to be written to from a c-level signal
s/to/
Line 50:     # handler, so it has to be non-blocking.
Line 51:     filecontrol.set_non_blocking(write_fd)
Line 52: 
Line 53:     # Set the read pipe end to non-blocking too, just in case.


Line 56:     # Prevent subproccesses we execute from inheriting the pipes.
Line 57:     filecontrol.set_close_on_exec(write_fd)
Line 58:     filecontrol.set_close_on_exec(read_fd)
Line 59: 
Line 60:     # This call must be done from the main thread.
already been said
Line 61:     signal.set_wakeup_fd(write_fd)
Line 62: 
Line 63:     poller = select.poll()
Line 64:     poller.register(read_fd, select.POLLIN)


-- 
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: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuzn...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: mooli tayer <mta...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to