mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
daemon mode
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user