[AGENT++] Unregistering for traps from a Forked Process

Jochen Katz katz at agentpp.com
Tue Mar 14 19:54:40 CET 2006


Hi,

> 1. Create a global singleton snmp object  and resgiter for traps .
> 2. Listen and receive traps parent process.
> 3. Fork various process for different functions.
> 4. Unregister for traps in the child forked process ....  can we expect
> the copy of the  snmp global object or global object pointer to be valid
> in the forked process and can we call the notify_unregister call
> successfuly in the forked children and stil have the parent main process
> listening  for traps ?

from what I know of fork, the Snmp objects are valid for both parent and
children. And as both have the open trap socket, you can (better have
to) call notify_unregister() in the child processes.

Regards,
  Jochen





More information about the AGENTPP mailing list