Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 218843
Collapse All | Expand All

(-)freeradius-server-2.0.3/src/main/event.c (-16 / +23 lines)
Lines 2291-2312 Link Here
2291
2367
2292
	if (listener->fd < 0) rad_panic("Socket was closed on us!");
2368
	if (listener->fd < 0) rad_panic("Socket was closed on us!");
2293
	
2369
	
2294
	/*
2295
	 *	FIXME: Put this somewhere else, where it isn't called
2296
	 *	all of the time...
2297
	 */
2298
#if !defined(HAVE_PTHREAD_H) && defined(WNOHANG)
2299
	/*
2300
	 *	If there are no child threads, then there may
2301
	 *	be child processes.  In that case, wait for
2302
	 *	their exit status, and throw that exit status
2303
	 *	away.  This helps get rid of zxombie children.
2304
	 */
2305
	while (waitpid(-1, &argval, WNOHANG) > 0) {
2306
		/* do nothing */
2307
	}
2308
#endif
2309
2310
	if (!listener->recv(listener, &fun, &request)) return;
2370
	if (!listener->recv(listener, &fun, &request)) return;
2311
2371
2312
	if (!thread_pool_addrequest(request, fun)) {
2372
	if (!thread_pool_addrequest(request, fun)) {
Lines 2389-2394 Link Here
2389
2449
2390
static void event_status(struct timeval *wake)
2450
static void event_status(struct timeval *wake)
2391
{
2451
{
2452
#if !defined(HAVE_PTHREAD_H) && defined(WNOHANG)
2453
	int argval;
2454
#endif
2455
2392
	if (debug_flag == 0) {
2456
	if (debug_flag == 0) {
2393
		if (just_started) {
2457
		if (just_started) {
2394
			radlog(L_INFO, "Ready to process requests.");
2458
			radlog(L_INFO, "Ready to process requests.");
Lines 2405-2410 Link Here
2405
		DEBUG("Waking up in %d.%01u seconds.",
2469
		DEBUG("Waking up in %d.%01u seconds.",
2406
		      (int) wake->tv_sec, (unsigned int) wake->tv_usec / 100000);
2470
		      (int) wake->tv_sec, (unsigned int) wake->tv_usec / 100000);
2407
	}
2471
	}
2472
2473
2474
	/*
2475
	 *	FIXME: Put this somewhere else, where it isn't called
2476
	 *	all of the time...
2477
	 */
2478
2479
#if !defined(HAVE_PTHREAD_H) && defined(WNOHANG)
2480
	/*
2481
	 *	If there are no child threads, then there may
2482
	 *	be child processes.  In that case, wait for
2483
	 *	their exit status, and throw that exit status
2484
	 *	away.  This helps get rid of zxombie children.
2485
	 */
2486
	while (waitpid(-1, &argval, WNOHANG) > 0) {
2487
		/* do nothing */
2488
	}
2489
#endif
2490
2408
}
2491
}
2409
2492
2410
2493

Return to bug 218843