ben 99/11/09 01:33:56
Modified: src/modules/mpm/prefork prefork.c
Log:
Fix error logging calls (kinda).
Revision Changes Path
1.50 +11 -9 apache-2.0/src/modules/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- prefork.c 1999/10/24 13:08:29 1.49
+++ prefork.c 1999/11/09 09:33:52 1.50
@@ -202,7 +202,7 @@
}
dir = ap_server_root_relative(pconf, buf[0] ? buf : dir);
if(mkdir(dir, 0755) < 0 && errno != EEXIST) {
- ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
"gprof: error creating directory %s", dir);
}
}
@@ -603,10 +603,11 @@
static void accept_mutex_child_init(ap_context_t *p)
{
ap_file_t *tempfile;
+ ap_status_t ret;
- ap_open(&tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, p);
- if (!tempfile) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+ ret=ap_open(&tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE,
p);
+ if (ret != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, ret, server_conf,
"Child cannot open lock file: %s", ap_lock_fname);
clean_child_exit(APEXIT_CHILDINIT);
}
@@ -620,13 +621,14 @@
static void accept_mutex_init(ap_context_t *p)
{
ap_file_t *tempfile;
+ ap_status_t ret;
expand_lock_fname(p);
unlink(ap_lock_fname);
- ap_open(&tempfile, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL,
+ ret=ap_open(&tempfile, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL,
APR_UREAD|APR_UWRITE, p);
- if (!tempfile) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+ if (ret != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, ret, server_conf,
"Parent cannot open lock file: %s", ap_lock_fname);
exit(APEXIT_INIT);
}
@@ -642,7 +644,7 @@
continue;
if (ret < 0) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
"flock: LOCK_EX: Error getting accept lock. Exiting!");
clean_child_exit(APEXIT_CHILDFATAL);
}
@@ -651,7 +653,7 @@
static void accept_mutex_off(void)
{
if (flock(lock_fd, LOCK_UN) < 0) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
"flock: LOCK_UN: Error freeing accept lock. Exiting!");
clean_child_exit(APEXIT_CHILDFATAL);
}