From: Jérôme Loyet Date: Sun, 7 Nov 2010 21:47:14 +0000 (+0000) Subject: - correct time comparison for determining the last idle child X-Git-Tag: php-5.4.0alpha1~191^2~717 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0621d39cd2684683ef417dfa71b3adf0e000d92;p=php - correct time comparison for determining the last idle child --- diff --git a/sapi/fpm/fpm/fpm_process_ctl.c b/sapi/fpm/fpm/fpm_process_ctl.c index b49767243f..4eae0a2926 100644 --- a/sapi/fpm/fpm/fpm_process_ctl.c +++ b/sapi/fpm/fpm/fpm_process_ctl.c @@ -336,7 +336,7 @@ static void fpm_pctl_perform_idle_server_maintenance(struct timeval *now, struct if (last_idle_child == NULL) { last_idle_child = child; } else { - if (child->started.tv_sec < last_idle_child->started.tv_sec) { + if (timercmp(&child->started, &last_idle_child->started, <)) { last_idle_child = child; } }