-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c76149b
commit d4445ac
Showing
2 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#ifndef ADAGUC_SERVER_FORK_SERVER_H | ||
#define ADAGUC_SERVER_FORK_SERVER_H | ||
|
||
#include <map> | ||
#include <time.h> | ||
|
||
typedef struct { | ||
int socket; | ||
time_t forked_at; | ||
} child_proc_t; | ||
|
||
static std::map<pid_t, child_proc_t> child_procs; | ||
|
||
int get_max_pending_connections(); | ||
void handle_client(int client_socket, int (*run_adaguc_once)(int, char **, char **, bool), int argc, char **argv, char **envp); | ||
void child_signal_handler(int child_signal); | ||
void *clean_child_procs(void *arg); | ||
int run_as_fork_service(int (*run_adaguc_once)(int, char **, char **, bool), int argc, char **argv, char **envp); | ||
|
||
#endif // ADAGUC_SERVER_FORK_SERVER_H |