TRAPS + get requests

"Nikanth K" <[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi
I am developing an agentx subagent on SUSE.
The problem is, I want to handle GET requests as well as TRAPS to be sent by
the same subagent.
But to handle get requests we need to loop on
       while(1)
        {
                agent_check_and_process(1); /* 0 == don't block */
        }
And I want to monitor and send traps as well.

If I use multi-threading(pthreads) to do this,i.e., one thread monitors and
sends traps and the other handles get-requests -  the subagent crashes at
some point of time. I heard multi-threading is not supported.

What is the best way to handle such situation?

Thanks & Regards
Nikanth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.