On Tue, 08 Mar 2005 17:01:23 -0800 Michael wrote: MH> I added the code to ignore the SIGPIPE signal and found that I also had MH> to remove the close(2) to get to the execv() call that runs the trap MH> handler.
That is really odd. I can't think of why a close call would not return. The only think I can think of would be to run strace on the agent, and look for operations on FD 2. When the agent daemonizes, it should close fd 2 and re-open it as /dev/null. MH> traphandle IF-MIB::linkDown "/home/mhiggins/src/snmp/traps.sh" linkDown MH> MH> This caused execv to fail with errno 2, no such file or directory. Thre MH> must be an error in tokenize_exec_command() because it was return the MH> command with the leading " still in place. Actually, the man page doesn't specify to use quotes, so it's a syntax error in the conf file. Maybe someone could submit a patch to try and verify the existence of trap handlers at startup, so an error could be logged then, instead of waiting til the exec fails. MH> Thanks again for the suggestion. Any idea if removing close(2) might MH> have some sort of side effect? Just that the daemon won't get any error messages printed to stderr from the script. Looking at the code in snmptrapd.c, it is doing things differently than snmpd.c. You might want to try coping the code from snmpd.c and seeing if the problem persists.. -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users