17949399 net-snmp does not replicate all threads to the daemon process
authorGowtham Thommandra <Gowtham.Thommandra@Oracle.COM>
Wed, 22 Jan 2014 01:46:00 -0800
changeset 1652 eedad834c07d
parent 1651 0e3a608a1823
child 1653 4cb88404a32d
17949399 net-snmp does not replicate all threads to the daemon process
components/net-snmp/patches/033.17949399.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/net-snmp/patches/033.17949399.patch	Wed Jan 22 01:46:00 2014 -0800
@@ -0,0 +1,20 @@
+--- net-snmp/snmplib/system.c	Tue Oct  9 15:28:58 2012
++++ net-snmp/snmplib/system.c	Mon Dec  2 23:36:52 2013
[email protected]@ -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));
[email protected]@ -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 "