17949399 net-snmp does not replicate all threads to the daemon process
authorGowtham Thommandra <Gowtham.Thommandra@Oracle.COM>
Wed, 27 Apr 2016 22:46:14 -0700
changeset 5869 d4a72a69caa0
parent 5868 2115ad091ad8
child 5870 5cbe1d266145
17949399 net-snmp does not replicate all threads to the daemon process
components/net-snmp-57/patches/063.17949399.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/net-snmp-57/patches/063.17949399.patch	Wed Apr 27 22:46:14 2016 -0700
@@ -0,0 +1,24 @@
+# Developed in-house. Submitted upstream
+# https://sourceforge.net/p/net-snmp/bugs/2587/
+# Need to use forkall() to fork all the threads. Otherwise the threads
+# for FM MIB etc will not be spawned causing failures during snmpwalk
+--- net-snmp/snmplib/system.c	Tue Oct  9 15:28:58 2012
++++ net-snmp/snmplib/system.c	Mon Dec  2 23:36:52 2013
+@@ -283,7 +283,7 @@
+      * Fork to return control to the invoking process and to
+      * guarantee that we aren't a process group leader.
+      */
+-    i = fork();
++    i = forkall();
+     if (i != 0) {
+         /* Parent. */
+         DEBUGMSGT(("daemonize","first fork returned %d.\n", i));
+@@ -305,7 +305,7 @@
+         /*
+          * Fork to let the process/session group leader exit.
+          */
+-        if ((i = fork()) != 0) {
++        if ((i = forkall()) != 0) {
+             DEBUGMSGT(("daemonize","second fork returned %d.\n", i));
+             if(i == -1) {
+                 snmp_log(LOG_ERR,"second fork failed (errno %d) in "