diff options
Diffstat (limited to 'erts/epmd/src/epmd.c')
-rw-r--r-- | erts/epmd/src/epmd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index dff9bc64de..9699491526 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -175,9 +175,9 @@ int main(int argc, char** argv) g->nodes.reg = g->nodes.unreg = g->nodes.unreg_tail = NULL; g->nodes.unreg_count = 0; g->active_conn = 0; -#ifdef HAVE_SYSTEMD_SD_DAEMON_H +#ifdef HAVE_SYSTEMD_DAEMON g->is_systemd = 0; -#endif +#endif /* HAVE_SYSTEMD_DAEMON */ for (i = 0; i < MAX_LISTEN_SOCKETS; i++) g->listenfd[i] = -1; @@ -251,11 +251,11 @@ int main(int argc, char** argv) else usage(g); epmd_cleanup_exit(g,0); -#ifdef HAVE_SYSTEMD_SD_DAEMON_H +#ifdef HAVE_SYSTEMD_DAEMON } else if (strcmp(argv[0], "-systemd") == 0) { g->is_systemd = 1; argv++; argc--; -#endif +#endif /* HAVE_SYSTEMD_DAEMON */ } else usage(g); } @@ -461,11 +461,11 @@ static void usage(EpmdVars *g) fprintf(stderr, " Forcibly unregisters a name with epmd\n"); fprintf(stderr, " (only allowed if -relaxed_command_check was given when \n"); fprintf(stderr, " epmd was started).\n"); -#ifdef HAVE_SYSTEMD_SD_DAEMON_H +#ifdef HAVE_SYSTEMD_DAEMON fprintf(stderr, " -systemd\n"); fprintf(stderr, " Wait for socket from systemd. The option makes sense\n"); fprintf(stderr, " when started from .socket unit.\n"); -#endif +#endif /* HAVE_SYSTEMD_DAEMON */ epmd_cleanup_exit(g,1); } @@ -594,10 +594,10 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) free(g->argv[i]); free(g->argv); } -#ifdef HAVE_SYSTEMD_SD_DAEMON_H +#ifdef HAVE_SYSTEMD_DAEMON sd_notifyf(0, "STATUS=Exited.\n" "ERRNO=%i", exitval); -#endif // HAVE_SYSTEMD_SD_DAEMON_H +#endif /* HAVE_SYSTEMD_DAEMON */ exit(exitval); } |