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
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