mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 15:43:02 +02:00
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
diff -urN netsnmp-5.9.3.orig/agent/snmpd.c netsnmp-5.9.3/agent/snmpd.c
|
|
--- netsnmp-5.9.3.orig/agent/snmpd.c 2025-03-04 18:09:48.420162455 +0100
|
|
+++ netsnmp-5.9.3/agent/snmpd.c 2025-03-04 18:13:48.149281606 +0100
|
|
@@ -123,7 +123,7 @@
|
|
# define PATH_MAX 255
|
|
# endif
|
|
#endif
|
|
-
|
|
+#include <sys/stat.h>
|
|
#include <net-snmp/net-snmp-includes.h>
|
|
#include <net-snmp/agent/net-snmp-agent-includes.h>
|
|
#include "agent_global_vars.h"
|
|
@@ -179,6 +179,7 @@
|
|
#define TIMETICK 500000L
|
|
|
|
int snmp_dump_packet;
|
|
+static char *pid_file = NULL;
|
|
static int reconfig = 0;
|
|
int Facility = LOG_DAEMON;
|
|
|
|
@@ -397,7 +398,6 @@
|
|
int dont_fork = 0, do_help = 0;
|
|
int log_set = 0;
|
|
int agent_mode = -1;
|
|
- char *pid_file = NULL;
|
|
char option_compatability[] = "-Le";
|
|
#ifndef WIN32
|
|
int prepared_sockets = 0;
|
|
@@ -1174,6 +1174,10 @@
|
|
ret = sigprocmask(SIG_UNBLOCK, &set, NULL);
|
|
netsnmp_assert(ret == 0);
|
|
#endif
|
|
+ if (pid_file) {
|
|
+ /* Signal readiness after reconf (Finit) */
|
|
+ utimensat(0, pid_file, NULL, 0);
|
|
+ }
|
|
}
|
|
|
|
/*******************************************************************-o-******
|