mirror of
https://github.com/apache/httpd.git
synced 2025-08-20 16:09:55 +00:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user