daemon mode

This commit is contained in:
Cloud Wu
2014-05-23 10:54:54 +08:00
parent 37ea7a025c
commit 1ce90b7d17
5 changed files with 12 additions and 9 deletions

View File

@@ -195,6 +195,12 @@ bootstrap(const char * cmdline) {
void
skynet_start(struct skynet_config * config) {
if (config->daemon) {
if (daemon(1,0)) {
fprintf(stderr, "daemon error");
exit(1);
}
}
skynet_harbor_init(config->harbor);
skynet_handle_init(config->harbor);
skynet_mq_init();