in modules/fcgid/fcgid_pm_win.c [232:252]
apr_status_t procmgr_fetch_cmd(fcgid_command * command,
server_rec * main_server)
{
fcgid_command *peakcmd = NULL;
if (!g_must_exit && g_msgqueue) {
if (apr_queue_pop(g_msgqueue, (void **)&peakcmd) == APR_SUCCESS) {
if (!peakcmd)
return APR_TIMEUP; /* This a wake up message */
else {
/* Copy the command, and then free the memory */
memcpy(command, peakcmd, sizeof(*peakcmd));
free(peakcmd);
return APR_SUCCESS;
}
}
}
return APR_TIMEUP;
}