Search code examples
key-value-storeg-wan

g-wan main.c - to listen to sockets


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.


Solution

  • 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 the host definitions already used by the first instance of G-WAN to listen on IPs and port numbers.

    Starting from there, you should rather use the maintenance script 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.