Comentários no código 2 - Apache
por Walter Cruz on 22/09/2008
in Geek life
E a bola da vez é o Apache. Quer ganhar pizza e cerveja grátis? Sirva dois bilhões de requisições ou tente (e consiga!) executar o apache com mpm-worker em uma máquina de 16 bits:
/* requests_this_child has gone to zero or below. See if the admin coded
"MaxRequestsPerChild 0", and keep going in that case. Doing it this way
simplifies the hot path in worker_thread */
static void check_infinite_requests(void)
{
if (ap_max_requests_per_child) {
signal_threads(ST_GRACEFUL);
}
else {
/* wow! if you're executing this code, you may have set a record.
* either this child process has served over 2 billion requests, or
* you're running a threaded 2.0 on a 16 bit machine.
*
* I'll buy pizza and beers at Apachecon for the first person to do
* the former without cheating (dorking with INT_MAX, or running with
* uncommitted performance patches, for example).
*
* for the latter case, you probably deserve a beer too. Greg Ames
*/
requests_this_child = INT_MAX; /* keep going */
}
}
Subscribe: 



Hahahaha
Só tem loco programando!
Cara, se você topar com um código meu um dia você pode acabar lendo algum pequeno conto que eu escrevo quando estou cansado de ver código =)
O GeSpeak mesmo deve ter uns 3 minicontos.
hehe, já tou lendo o código do gespeak aqui!