Let CGI daemon die if the network layer has been shut down (problem noticed on BS2000/OSD)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Martin Kraemer
2004-06-29 13:48:20 +00:00
parent ea2cedde8c
commit 1577a9adf6

View File

@ -641,6 +641,12 @@ static int cgid_server(void *data)
len = sizeof(unix_addr);
sd2 = accept(sd, (struct sockaddr *)&unix_addr, &len);
if (sd2 < 0) {
#if defined(ENETDOWN)
if (errno == ENETDOWN) {
/* The network has been shut down, no need to continue. Die gracefully */
++daemon_should_exit;
}
#endif
if (errno != EINTR) {
ap_log_error(APLOG_MARK, APLOG_ERR, errno,
(server_rec *)data,