diff options
-rw-r--r-- | erts/epmd/src/epmd.c | 6 | ||||
-rw-r--r-- | erts/epmd/src/epmd_srv.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index 5513cb2d7e..4740ce8534 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -592,8 +592,10 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) free(g->argv); } #ifdef HAVE_SYSTEMD_DAEMON - sd_notifyf(0, "STATUS=Exited.\n" - "ERRNO=%i", exitval); + if (g->is_systemd){ + sd_notifyf(0, "STATUS=Exited.\n" + "ERRNO=%i", exitval); + } #endif /* HAVE_SYSTEMD_DAEMON */ exit(exitval); } diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index e1bac99ef9..59d59ad0f7 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -452,9 +452,11 @@ void run(EpmdVars *g) num_sockets = bound; #ifdef HAVE_SYSTEMD_DAEMON } - sd_notifyf(0, "READY=1\n" - "STATUS=Processing port mapping requests...\n" - "MAINPID=%lu", (unsigned long) getpid()); + if (g->is_systemd) { + sd_notifyf(0, "READY=1\n" + "STATUS=Processing port mapping requests...\n" + "MAINPID=%lu", (unsigned long) getpid()); + } #endif /* HAVE_SYSTEMD_DAEMON */ dbg_tty_printf(g,2,"entering the main select() loop"); |