10 #include <sys/select.h>
13 #include <opensrf/utils.h>
14 #include <opensrf/transport_message.h>
15 #include <opensrf/transport_client.h>
16 #include <opensrf/osrf_stack.h>
17 #include <opensrf/osrf_settings.h>
18 #include <opensrf/osrfConfig.h>
21 /* we receive data. we find the next child in
22 line that is available. pass the data down that childs pipe and go
23 back to listening for more data.
24 when we receive SIGCHLD, we check for any dead children and clean up
25 their respective prefork_child objects, close pipes, etc.
27 we build a select fd_set with all the child pipes (going to the parent)
28 when a child is done processing a request, it writes a small chunk of
29 data to the parent to alert the parent that the child is again available
32 int osrf_prefork_run(const char* appname);