This is the server-side process manage framework, which is highly inspired by Nginx master-worker process manage methods. I have described the main idea at this article. The master process will detect, monitor and control all its child process, which will guarantee the high-availability project deployment.
c++11 standard is natived supported, but if you are required on some legacy environment such as RHEL/CentOS 6.x, then official g++ 4.4 branch only support c++0x standard, in this case you may install boost libraries for boost::function, boost::shared_ptr and so on. Pay attention to the g++ arguments in Makefile.
There are two way to use this forkp:
(1). Treat it as general multi-process program library, so you can develop Nginx-like master & worker multi-process project base on this work without start from zero, child process will be monitored and auto restarted when needed. In addition, it is some what different from Nginx, you can start different processes at different time, forkp will guarantee exactly as your call of spawnWorkers;
(2). Treat it as general program or service monitor, you can start different already binary program, and forkp will wait for SIGCHLD and kill-0 method to detect whether target program still alive. Flexible add and remove program will be added in near futuer.
Child process stdout and stderr will be atomaticly redirected and recorded at log directory, KILL the fork master process with SIGNALS specified at general.hpp will give you some basic controls.
This project is being tested in production envrionment, and some other features will come soon, hope you enjoy it!