|
@@ -55,6 +55,16 @@
|
|
|
|
|
|
#include "procmon.h"
|
|
#include "procmon.h"
|
|
|
|
|
|
|
|
+#ifdef HAVE_SYSTEMD
|
|
|
|
+# if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__)
|
|
|
|
+
|
|
|
|
+ * Coverity. Here's a kludge to unconfuse it.
|
|
|
|
+ */
|
|
|
|
+# define __INCLUDE_LEVEL__ 2
|
|
|
|
+# endif
|
|
|
|
+#include <systemd/sd-daemon.h>
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
|
|
extern int quiet_level;
|
|
extern int quiet_level;
|
|
|
|
|
|
@@ -1018,6 +1028,11 @@ options_act_reversible(const or_options_t *old_options, char **msg)
|
|
start_daemon();
|
|
start_daemon();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef HAVE_SYSTEMD
|
|
|
|
+
|
|
|
|
+ sd_notifyf(0, "MAINPID=%ld\n", (long int)getpid());
|
|
|
|
+#endif
|
|
|
|
+
|
|
#ifndef HAVE_SYS_UN_H
|
|
#ifndef HAVE_SYS_UN_H
|
|
if (options->ControlSocket || options->ControlSocketsGroupWritable) {
|
|
if (options->ControlSocket || options->ControlSocketsGroupWritable) {
|
|
*msg = tor_strdup("Unix domain sockets (ControlSocket) not supported "
|
|
*msg = tor_strdup("Unix domain sockets (ControlSocket) not supported "
|