I was just asking since I was getting confused with the readings I have seen
regarding threads.
Currently our subagent is built into it's own library shared object (so) file
and started by itself when our hardware box comes up as part of our box's main
application. I am now adding code to make sure the subagent starts in it's own
thread within this main application.
Now, if we add other subagents in the future then I was assuming each of these
new subagents will be built into their own library shared object (so) file and
started in their own thread but as part of the same main application of our
hardware box. Basically, our main application starts when the box is rebooted
and then each subagent would be given their our thread to run in. Is it bad to
start each subagent in their own thread but from within the same application?
What are the problems of doing this way? Are these the thread-safe issues I
have been reading about?
Oh yeah, once our hardware box comes up then the master agent is started as a
separate application by simply running the snmpd program.
Dave Shield <[EMAIL PROTECTED]> wrote: On 31/07/07, Need Help wrote:
> Does this mean the subagent and master agent
> should be started in the same thread, or can I start the subagent in a
> thread of it's own and still be safe?
The whole point of having master and subagents is that they
are two completely separate applications.
I wouldn't run them as separate threads from the same
basic application - better to invoke them as two completely
separate applications.
Or at the very least, use fork() and exec() to separate them off
from your main application driving routine.
The same would hold true for any subsequent subagents too.
Dave
---------------------------------
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders