]> git.evergreen-ils.org Git - OpenSRF.git/blob - include/opensrf/osrf_prefork.h
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 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 /* we receive data.  we find the next child in
25         line that is available.  pass the data down that childs pipe and go
26         back to listening for more data.
27         when we receive SIGCHLD, we check for any dead children and clean up
28         their respective prefork_child objects, close pipes, etc.
29
30         we build a select fd_set with all the child pipes (going to the parent) 
31         when a child is done processing a request, it writes a small chunk of 
32         data to the parent to alert the parent that the child is again available 
33         */
34
35 int osrf_prefork_run(const char* appname);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif