Lines Matching refs:g_prefork_server

2741 static lsapi_prefork_server * g_prefork_server = NULL;  variable
2746 if ( g_prefork_server ) in LSAPI_Init_Prefork_Server()
2756 g_prefork_server = (lsapi_prefork_server *)malloc( sizeof( lsapi_prefork_server ) ); in LSAPI_Init_Prefork_Server()
2757 if ( !g_prefork_server ) in LSAPI_Init_Prefork_Server()
2759 memset( g_prefork_server, 0, sizeof( lsapi_prefork_server ) ); in LSAPI_Init_Prefork_Server()
2770 g_prefork_server->m_iAvoidFork = avoidFork; in LSAPI_Init_Prefork_Server()
2771 g_prefork_server->m_iMaxChildren = max_children; in LSAPI_Init_Prefork_Server()
2773 g_prefork_server->m_iExtraChildren = ( avoidFork ) ? 0 : (max_children / 3) ; in LSAPI_Init_Prefork_Server()
2774 g_prefork_server->m_iMaxIdleChildren = ( avoidFork ) ? (max_children + 1) : (max_children / 3); in LSAPI_Init_Prefork_Server()
2775 if ( g_prefork_server->m_iMaxIdleChildren == 0 ) in LSAPI_Init_Prefork_Server()
2776 g_prefork_server->m_iMaxIdleChildren = 1; in LSAPI_Init_Prefork_Server()
2777 g_prefork_server->m_iChildrenMaxIdleTime = 300; in LSAPI_Init_Prefork_Server()
2778 g_prefork_server->m_iMaxReqProcessTime = 3600; in LSAPI_Init_Prefork_Server()
2788 if( g_prefork_server ) in LSAPI_Set_Server_fd()
2789 g_prefork_server->m_fd = fd; in LSAPI_Set_Server_fd()
2831 lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus; in find_child_status()
2832 lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd; in find_child_status()
2842 if ( pStatus + 1 > g_prefork_server->m_pChildrenStatusCur ) in find_child_status()
2843 g_prefork_server->m_pChildrenStatusCur = pStatus + 1; in find_child_status()
2857 g_prefork_server->m_iCurChildren = 0; in LSAPI_reset_server_state()
2858 lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus; in LSAPI_reset_server_state()
2859 lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd; in LSAPI_reset_server_state()
2877 if (g_prefork_server == NULL) in lsapi_sigchild()
2927 --g_prefork_server->m_iCurChildren; in lsapi_sigchild()
2930 while(( g_prefork_server->m_pChildrenStatusCur > g_prefork_server->m_pChildrenStatus ) in lsapi_sigchild()
2931 &&( g_prefork_server->m_pChildrenStatusCur[-1].m_pid == 0 )) in lsapi_sigchild()
2932 --g_prefork_server->m_pChildrenStatusCur; in lsapi_sigchild()
2941 if (g_prefork_server->m_pChildrenStatus) in lsapi_init_children_status()
2943 max_children = g_prefork_server->m_iMaxChildren in lsapi_init_children_status()
2944 + g_prefork_server->m_iExtraChildren; in lsapi_init_children_status()
2957 g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf; in lsapi_init_children_status()
2958 g_prefork_server->m_pChildrenStatusCur = (lsapi_child_status *)pBuf; in lsapi_init_children_status()
2959 g_prefork_server->m_pChildrenStatusEnd = (lsapi_child_status *)pBuf + max_children; in lsapi_init_children_status()
2960 s_busy_workers = (int *)g_prefork_server->m_pChildrenStatusEnd; in lsapi_init_children_status()
3004 lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus; in lsapi_check_child_status()
3005 lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusCur; in lsapi_check_child_status()
3015 if (g_prefork_server->m_iCurChildren - dying in lsapi_check_child_status()
3016 > g_prefork_server->m_iMaxChildren in lsapi_check_child_status()
3017 || idle > g_prefork_server->m_iMaxIdleChildren) in lsapi_check_child_status()
3037 g_prefork_server->m_iMaxReqProcessTime) in lsapi_check_child_status()
3072 if ( abs( g_prefork_server->m_iCurChildren - count ) > 1 ) in lsapi_check_child_status()
3076 g_prefork_server->m_iCurChildren, count, idle, dying ); in lsapi_check_child_status()
3250 g_prefork_server = NULL; in lsapi_prefork_server_accept()
3331 int max_children = g_prefork_server->m_iMaxChildren; in LSAPI_Postfork_Child()
3337 g_prefork_server = NULL; in LSAPI_Postfork_Child()
3372 ++g_prefork_server->m_iCurChildren; in LSAPI_Postfork_Parent()
3394 lsapi_prefork_server * pServer = g_prefork_server; in LSAPI_Accept_Before_Fork()
3549 if ( g_prefork_server ) in LSAPI_Prefork_Accept_r()
3551 if ( g_prefork_server->m_fd != -1 ) in LSAPI_Prefork_Accept_r()
3552 if ( lsapi_prefork_server_accept( g_prefork_server, pReq ) == -1 ) in LSAPI_Prefork_Accept_r()
3710 if ( g_prefork_server ) in LSAPI_Set_Max_Children()
3711 g_prefork_server->m_iMaxChildren = maxChildren; in LSAPI_Set_Max_Children()
3717 if (( g_prefork_server )&&( extraChildren >= 0 )) in LSAPI_Set_Extra_Children()
3718 g_prefork_server->m_iExtraChildren = extraChildren; in LSAPI_Set_Extra_Children()
3724 if (( g_prefork_server )&&( secs > 0 )) in LSAPI_Set_Max_Process_Time()
3725 g_prefork_server->m_iMaxReqProcessTime = secs; in LSAPI_Set_Max_Process_Time()
3731 if (( g_prefork_server )&&( maxIdleChld > 0 )) in LSAPI_Set_Max_Idle_Children()
3732 g_prefork_server->m_iMaxIdleChildren = maxIdleChld; in LSAPI_Set_Max_Idle_Children()
3738 if ( g_prefork_server ) in LSAPI_Set_Server_Max_Idle_Secs()
3739 g_prefork_server->m_iServerMaxIdle = serverMaxIdle; in LSAPI_Set_Server_Max_Idle_Secs()
3821 if ( g_prefork_server ) in lsapi_initSuEXEC()
3823 if ( g_prefork_server->m_iMaxChildren < 100 ) in lsapi_initSuEXEC()
3824 g_prefork_server->m_iMaxChildren = 100; in lsapi_initSuEXEC()
3825 if ( g_prefork_server->m_iExtraChildren < 1000 ) in lsapi_initSuEXEC()
3826 g_prefork_server->m_iExtraChildren = 1000; in lsapi_initSuEXEC()