Closed tdeva14 closed 3 years ago
Just an additional info. s6-supervise for snmpd-srv has this pipe opened for reading the notification message (I assume) but not sure if this gets destroyed right before the write
call
s6-superv 2784 root 8r FIFO 0,10 0t0 160433 pipe
Sorry my bad. There was a piece of code in snmpd which closed all non-standard fds (fds >2) that destroyed the notification pipe. Notification worked after commenting out below code.
* close all non-standard file descriptors we may have
* inherited from the shell.
*/
if (!prepared_sockets)
netsnmp_close_fds(2);
I have been trying to make readiness notification work for snmpd daemon but somehow I always end up in errno 9
EBADF 9 Bad file descriptor
Below is the readiness snippet in snmpd
And below are the contents in snmpd-srv directory
Am I missing something? Please let me know if any further information is required. Any help is really appreciated.