Skip to content

Instantly share code, notes, and snippets.

@kaworu
Created November 26, 2015 12:05
Show Gist options
  • Select an option

  • Save kaworu/646ed7b1bb6240183d52 to your computer and use it in GitHub Desktop.

Select an option

Save kaworu/646ed7b1bb6240183d52 to your computer and use it in GitHub Desktop.
diff --git a/src/main.c b/src/main.c
index e42f3eb..7a2e524 100644
--- a/src/main.c
+++ b/src/main.c
@@ -281,8 +281,9 @@ main(int argc, char *argv[])
exit(EX_UNAVAILABLE);
}
- if (pthread_create (&reload_thr, NULL, reload_thread, NULL)) {
- msg_warn ("main: cannot start reload thread, ignoring error");
+ if (smfi_opensocket(true) == MI_FAILURE) {
+ msg_err("Unable to open listening socket");
+ exit(EX_UNAVAILABLE);
}
if (daemonize && daemon (0, 0) == -1) {
@@ -290,9 +291,8 @@ main(int argc, char *argv[])
exit(EX_UNAVAILABLE);
}
- if (smfi_opensocket(true) == MI_FAILURE) {
- msg_err("Unable to open listening socket");
- exit(EX_UNAVAILABLE);
+ if (pthread_create (&reload_thr, NULL, reload_thread, NULL)) {
+ msg_warn ("main: cannot start reload thread, ignoring error");
}
if (cfg->pid_file) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment