]> granicus.if.org Git - php/commitdiff
- correct time comparison for determining the last idle child
authorJérôme Loyet <fat@php.net>
Sun, 7 Nov 2010 21:47:14 +0000 (21:47 +0000)
committerJérôme Loyet <fat@php.net>
Sun, 7 Nov 2010 21:47:14 +0000 (21:47 +0000)
sapi/fpm/fpm/fpm_process_ctl.c

index b49767243f851d2d5fa3a856d359970bd8dcd4ff..4eae0a2926fa51cca96c85efa726f591e774a6dd 100644 (file)
@@ -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;
                                        }
                                }