[Asterisk-code-review] core: Use ast alertpipe for Asterisk signal monitoring thread. (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Mon Nov 13 16:33:42 CST 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/7169 )

Change subject: core: Use ast_alertpipe for Asterisk signal monitoring thread.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/7169/1/main/asterisk.c
File main/asterisk.c:

https://gerrit.asterisk.org/#/c/7169/1/main/asterisk.c@1769
PS1, Line 1769: 	if (ast_alertpipe_writable(sig_alert_pipe)) {
              : 		if (ast_alertpipe_write(sig_alert_pipe)) {
ast_alertpipe_write calls ast_alertpipe_writable before trying to write, so you could remove the call to writable to avoid checking it twice. However, if it fails the writable check in write, write returns 0, so you'll have to modify the alertpipe_write return check. But then that makes me think if the writable check in alertpipe_write shouldn't return -1 instead if it fails? Thoughts?



-- 
To view, visit https://gerrit.asterisk.org/7169
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id4041a237d481ff699639e153ea6982fee14a462
Gerrit-Change-Number: 7169
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Mon, 13 Nov 2017 22:33:42 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171113/5d394bb1/attachment.html>


More information about the asterisk-code-review mailing list