]> granicus.if.org Git - apache/commitdiff
improve ap_mpm_pod_signal() by not let it loop until it fills the pipe
authorJeff Trawick <trawick@apache.org>
Thu, 7 Jun 2001 15:18:28 +0000 (15:18 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 7 Jun 2001 15:18:28 +0000 (15:18 +0000)
it still doesn't handle the pipe being full for other reasons (bazillions
of child processes?), but I'm not sure that is a real occurrence

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89294 13f79535-47bb-0310-9956-ffa450edef68

server/mpm_common.c

index 8a9fcf3fa3904ae1964c1bc9bad306f3b1305a6e..a9d792014d798523f023468d596808857406a5fe 100644 (file)
@@ -394,18 +394,13 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod)
     apr_size_t one = 1;
 
     do {
-        if ((rv = apr_file_write(pod->pod_out, &char_of_death, &one))
-                                 != APR_SUCCESS) {
-            if (APR_STATUS_IS_EINTR(rv)) {
-                continue;
-            }
-            else {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
-                             "write pipe_of_death");
-                return rv;
-            }
-        }
-    } while (1);
+        rv = apr_file_write(pod->pod_out, &char_of_death, &one);
+    } while (APR_STATUS_IS_EINTR(rv));
+    if (rv != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
+                     "write pipe_of_death");
+        return rv;
+    }
     
     apr_sockaddr_info_get(&sa, "127.0.0.1", APR_UNSPEC, ap_listeners->bind_addr->port, 0, pod->p);
     apr_socket_create(&sock, sa->family, SOCK_STREAM, pod->p);