ben 96/04/17 09:36:36
Modified: src http_main.c
Log:
Various system calls were not logging errors properly. Fixed.
Revision Changes Path
1.23 +4 -4 apache/src/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C3 -r1.22 -r1.23
*** http_main.c 1996/04/11 19:38:38 1.22
--- http_main.c 1996/04/17 16:36:34 1.23
***************
*** 534,540 ****
perror("shmctl");
fprintf(stderr, "httpd: Could not delete segment #%d\n", shmid);
sprintf(errstr, "could not remove shared memory segment #%d", shmid);
! log_error(errstr, server_conf);
}
if (scoreboard_image == BADSHMAT) /* now bailout */
exit(1);
--- 534,540 ----
perror("shmctl");
fprintf(stderr, "httpd: Could not delete segment #%d\n", shmid);
sprintf(errstr, "could not remove shared memory segment #%d", shmid);
! log_unixerr("shmctl","IPC_RMID",errstr, server_conf);
}
if (scoreboard_image == BADSHMAT) /* now bailout */
exit(1);
***************
*** 919,925 ****
uid_t uid=atoi(&user_name[1]);
if ((ent = getpwuid(uid)) == NULL) {
! log_error("couldn't determine user name from uid", server_conf);
exit(1);
}
--- 919,925 ----
uid_t uid=atoi(&user_name[1]);
if ((ent = getpwuid(uid)) == NULL) {
! log_unixerr("getpwuid",NULL,"couldn't determine user name from uid",
server_conf);
exit(1);
}
***************
*** 1131,1137 ****
memcpy(&fds, &listenfds, sizeof(fd_set));
csd = select(listenmaxfd+1, &fds, NULL, NULL, NULL);
if (csd == -1 && errno != EINTR)
! log_error("select error", server_conf);
if (csd <= 0) continue;
for (sd=listenmaxfd; sd >= 0; sd--)
if (FD_ISSET(sd, &fds)) break;
--- 1131,1137 ----
memcpy(&fds, &listenfds, sizeof(fd_set));
csd = select(listenmaxfd+1, &fds, NULL, NULL, NULL);
if (csd == -1 && errno != EINTR)
! log_unixerr("select",NULL,"select error", server_conf);
if (csd <= 0) continue;
for (sd=listenmaxfd; sd >= 0; sd--)
if (FD_ISSET(sd, &fds)) break;
***************
*** 1146,1152 ****
} else
while ((csd=accept(sd, &sa_client, &clen)) == -1)
if (errno != EINTR)
! log_error("socket error: accept failed", server_conf);
accept_mutex_off(); /* unlock after "accept" */
--- 1146,1152 ----
} else
while ((csd=accept(sd, &sa_client, &clen)) == -1)
if (errno != EINTR)
! log_unixerr("accept",NULL,"socket error: accept failed",
server_conf);
accept_mutex_off(); /* unlock after "accept" */