void child_main(void) { setbuf(stdout, NULL); setbuf(stderr, NULL); printf("Child starts\n"); cache_param = heritage.param; AZ(pthread_key_create(&sp_key, NULL)); AZ(pthread_key_create(&name_key, NULL)); THR_SetName("cache-main"); VSM_Init(); /* First, LCK needs it. */ LCK_Init(); /* Second, locking */ WAIT_Init(); PAN_Init(); CLI_Init(); Fetch_Init(); CNT_Init(); VCL_Init(); HTTP_Init(); VDI_Init(); VBO_Init(); VBE_InitCfg(); VBP_Init(); WRK_Init(); Pool_Init(); EXP_Init(); HSH_Init(heritage.hash); BAN_Init(); VCA_Init(); SMS_Init(); SMP_Init(); STV_open(); VMOD_Init(); BAN_Compile(); /* Wait for persistent storage to load if asked to */ if (cache_param->diag_bitmap & 0x00020000) SMP_Ready(); CLI_Run(); STV_close(); printf("Child dies\n"); }
void child_main(void) { setbuf(stdout, NULL); setbuf(stderr, NULL); printf("Child starts\n"); cache_param = heritage.param; AZ(pthread_key_create(&req_key, NULL)); AZ(pthread_key_create(&name_key, NULL)); THR_SetName("cache-main"); VSM_Init(); /* First, LCK needs it. */ LCK_Init(); /* Second, locking */ Lck_New(&vxid_lock, lck_vxid); WAIT_Init(); PAN_Init(); CLI_Init(); Fetch_Init(); VCL_Init(); HTTP_Init(); VDI_Init(); VBO_Init(); VBE_InitCfg(); VBP_Init(); WRK_Init(); Pool_Init(); EXP_Init(); HSH_Init(heritage.hash); BAN_Init(); VCA_Init(); SMS_Init(); SMP_Init(); STV_open(); VMOD_Init(); BAN_Compile(); srandomdev(); srand48(random()); CLI_AddFuncs(debug_cmds); /* Wait for persistent storage to load if asked to */ if (FEATURE(FEATURE_WAIT_SILO)) SMP_Ready(); Pool_Accept(); CLI_Run(); STV_close(); printf("Child dies\n"); }