#include <assert.h>
#include <errno.h>
#include <getopt.h>
-#include <google/protobuf/stubs/common.h>
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
int main(int argc, char **argv)
{
+ signal(SIGHUP, hup);
+
// Parse options.
int state_fd = -1;
bool test_config = false;
// Find all streams in the configuration file, and create them.
create_streams(config, deserialized_stream_ids, &deserialized_inputs);
- servers->run();
-
vector<Acceptor *> acceptors = create_acceptors(config, &deserialized_acceptors);
vector<Input *> inputs = create_inputs(config, &deserialized_inputs);
for (int i = 0; i < loaded_state.clients_size(); ++i) {
servers->add_client_from_serialized(loaded_state.clients(i));
}
+
+ servers->run();
// Start writing statistics.
StatsThread *stats_thread = NULL;
stats_thread->run();
}
- signal(SIGHUP, hup);
-
struct timeval server_start;
gettimeofday(&server_start, NULL);
if (state_fd != -1) {