Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid eventloop restart if listen_address or port didn't changed #13

Merged
merged 3 commits into from
Nov 13, 2017

Conversation

CyberDem0n
Copy link
Owner

  • use event_base_loopexit function to stop eventloop instead of pthread_cancel

use event_base_loopexit function to stop eventloop instead of
pthread_cancel
@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 86.622% when pulling 7adafc2 on feature/smart-sighup into 796690f on master.

bg_mon.c Outdated

restart:
strcpy(bg_mon_listen_address, bg_mon_listen_address_guc);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strncpy?

bg_mon.c Outdated
@@ -270,6 +270,13 @@ bg_mon_main(Datum main_arg)
evthread_use_pthreads();

restart:
bg_mon_listen_address = repalloc(bg_mon_listen_address,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to pfree the old value before rewriting it?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 85.889% when pulling e87d68a on feature/smart-sighup into 796690f on master.

@CyberDem0n CyberDem0n merged commit df9ec7b into master Nov 13, 2017
@CyberDem0n CyberDem0n deleted the feature/smart-sighup branch November 13, 2017 09:19
CyberDem0n added a commit that referenced this pull request Nov 13, 2017
use event_base_loopexit function to stop eventloop instead of pthread_cancel
CyberDem0n added a commit that referenced this pull request Nov 13, 2017
use event_base_loopexit function to stop eventloop instead of pthread_cancel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants