I want to fork a sub-program to do some routine jobs or listen to some sockets.
If this can be done, please show with a simple example how this forked program can access the G-WAN KV store via a persistent pointer.
I want to fork a sub-program to do some routine jobs or listen to
Share
I guess you want to execute a third-party program rather than forking G-WAN.
If you
fork()G-WAN, you will have a second process that fails to listen to thehost definitionsalready used by the first instance of G-WAN to listen on IPs and port numbers.Starting from there, you should rather use the
maintenancescript or launch a third-party program (which will not share the memory address space of G-WAN).Now, you can’t share in-memory KV stores between processes yet – but this is on our TODO list.