components/net-snmp/patches/054.21442284.snmptrapd.patch
branchs11u2-sru
changeset 4685 da890a7f6af0
equal deleted inserted replaced
4673:7ca7277ea064 4685:da890a7f6af0
       
     1 Patch developed inhouse and has been accepted by the community.
       
     2 Details can be found at
       
     3 https://sourceforge.net/p/net-snmp/bugs/2654/
       
     4 The community patch differs slightly from this as it needs to be
       
     5 generic for all OSes, hence they have included an extra check for the availability
       
     6 of the forkall function. 
       
     7 --- net-snmp-5.4.1.old/apps/snmptrapd.c	2007-06-08 03:44:37.000000000 -0700
       
     8 +++ net-snmp-5.4.1/apps/snmptrapd.c	2015-05-20 05:12:11.512063848 -0700
       
     9 @@ -1237,7 +1237,7 @@
       
    10      if (dofork && netsnmp_running) {
       
    11          int             fd;
       
    12  
       
    13 -        switch (fork()) {
       
    14 +        switch (forkall()) {
       
    15          case -1:
       
    16              fprintf(stderr, "bad fork - %s\n", strerror(errno));
       
    17              _exit(1);