]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/osrf_prefork.h
Add compilation guard; prepare for #inclusion in C++
[OpenSRF.git] / include / opensrf / osrf_prefork.h
1 #ifndef OSRF_PREFORK_H
2 #define OSRF_PREFORK_H
3
4 #include <sys/types.h>
5 #include <sys/time.h>
6 #include <unistd.h>
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <sys/select.h>
11 #include <sys/wait.h>
12
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>
19
20
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.
26
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 
30         */
31
32 int osrf_prefork_run(const char* appname);
33
34 #endif