mirror of
https://git.kore.io/kore.git
synced 2024-11-15 22:46:21 +01:00
Slightly change kore_parent_configure() again.
- Call it before loading configurations when built as single binaries. - Call it right before forking workers when built as a dso.
This commit is contained in:
parent
311e658d57
commit
37443df6b0
15
src/kore.c
15
src/kore.c
@ -122,7 +122,9 @@ version(void)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
#if defined(KORE_SINGLE_BINARY)
|
||||
struct kore_runtime_call *rcall;
|
||||
#endif
|
||||
int ch, flags;
|
||||
|
||||
flags = 0;
|
||||
@ -198,12 +200,12 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
#else
|
||||
kore_module_load(NULL, NULL, KORE_MODULE_NATIVE);
|
||||
#endif
|
||||
rcall = kore_runtime_getcall("kore_parent_configure");
|
||||
if (rcall != NULL) {
|
||||
kore_runtime_execute(rcall);
|
||||
kore_free(rcall);
|
||||
}
|
||||
#endif
|
||||
|
||||
kore_parse_config();
|
||||
kore_platform_init();
|
||||
@ -416,6 +418,9 @@ kore_server_start(void)
|
||||
{
|
||||
u_int32_t tmp;
|
||||
int quit;
|
||||
#if !defined(KORE_SINGLE_BINARY)
|
||||
struct kore_runtime_call *rcall;
|
||||
#endif
|
||||
|
||||
if (foreground == 0 && daemon(1, 1) == -1)
|
||||
fatal("cannot daemon(): %s", errno_s);
|
||||
@ -434,6 +439,14 @@ kore_server_start(void)
|
||||
#if defined(KORE_USE_JSONRPC)
|
||||
kore_log(LOG_NOTICE, "jsonrpc built-in enabled");
|
||||
#endif
|
||||
#if !defined(KORE_SINGLE_BINARY)
|
||||
rcall = kore_runtime_getcall("kore_parent_configure");
|
||||
if (rcall != NULL) {
|
||||
kore_runtime_execute(rcall);
|
||||
kore_free(rcall);
|
||||
}
|
||||
#endif
|
||||
|
||||
kore_platform_proctitle("kore [parent]");
|
||||
kore_msg_init();
|
||||
kore_worker_init();
|
||||
|
Loading…
Reference in New Issue
Block a user