]> granicus.if.org Git - apache/blobdiff - server/mpm/prefork/prefork.c
Add a status value to ap_log_error and ap_log_rerror. This allows us to use
[apache] / server / mpm / prefork / prefork.c
index e628997bca1b6d30462c5bf2fa9ae3d947c10e1a..bbe33303436ea209f2186ca7653a01300bd552a5 100644 (file)
@@ -116,7 +116,6 @@ static int ap_max_requests_per_child=0;
 static char *ap_pid_fname=NULL;
 static char *ap_scoreboard_fname=NULL;
 static char *ap_lock_fname;
-static char *ap_server_argv0=NULL;
 static int ap_daemons_to_start=0;
 static int ap_daemons_min_free=0;
 static int ap_daemons_max_free=0;
@@ -486,7 +485,7 @@ static void accept_mutex_init(ap_context_t *p)
     }
     ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
 
-    /* pre ap_context_t nitialize these */
+    /* preinitialize these */
     op_on.sem_num = 0;
     op_on.sem_op = -1;
     op_on.sem_flg = SEM_UNDO;
@@ -542,8 +541,8 @@ static void accept_mutex_init(ap_context_t *p)
     unlock_it.l_pid = 0;               /* pid not actually interesting */
 
     expand_lock_fname(p);
-    ap_open(&tempfile, p, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
-            APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD);
+    ap_open(&tempfile, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
+            APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p);
     ap_get_os_file(&lock_fd, tempfile);
     if (lock_fd == -1) {
        perror("open");
@@ -562,7 +561,7 @@ static void accept_mutex_on(void)
     }
 
     if (ret < 0) {
-       ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
                    "fcntl: F_SETLKW: Error getting accept lock, exiting!  "
                    "Perhaps you need to use the LockFile directive to place "
                    "your lock file on a local disk!");
@@ -578,7 +577,7 @@ static void accept_mutex_off(void)
        /* nop */
     }
     if (ret < 0) {
-       ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
                    "fcntl: F_SETLKW: Error freeing accept lock, exiting!  "
                    "Perhaps you need to use the LockFile directive to place "
                    "your lock file on a local disk!");
@@ -605,7 +604,7 @@ static void accept_mutex_child_init(ap_context_t *p)
 {
     ap_file_t *tempfile;
 
-    ap_open(&tempfile, p, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE);
+    ap_open(&tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, p);
     if (!tempfile) {
        ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
                    "Child cannot open lock file: %s", ap_lock_fname);
@@ -624,8 +623,8 @@ static void accept_mutex_init(ap_context_t *p)
 
     expand_lock_fname(p);
     unlink(ap_lock_fname);
-    ap_open(&tempfile, p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL,
-           APR_UREAD|APR_UWRITE);
+    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,
                    "Parent cannot open lock file: %s", ap_lock_fname);
@@ -1153,18 +1152,18 @@ static void setup_shared_mem(ap_context_t *p)
     if ((shmid = shmget(shmkey, SCOREBOARD_SIZE, IPC_CREAT | SHM_R | SHM_W)) == -1) {
 #ifdef LINUX
        if (errno == ENOSYS) {
-           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, server_conf,
+           ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, server_conf,
                         "Your kernel was built without CONFIG_SYSVIPC\n"
                         "%s: Please consult the Apache FAQ for details",
                         ap_server_argv0);
        }
 #endif
-       ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
                    "could not call shmget");
        exit(APEXIT_INIT);
     }
 
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf,
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, server_conf,
                "created shared memory segment #%d", shmid);
 
 #ifdef MOVEBREAK
@@ -1185,21 +1184,21 @@ static void setup_shared_mem(ap_context_t *p)
 
 #define BADSHMAT       ((scoreboard *)(-1))
     if ((ap_scoreboard_image = (scoreboard *) shmat(shmid, 0, 0)) == BADSHMAT) {
-       ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, "shmat error");
+       ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf, "shmat error");
        /*
         * We exit below, after we try to remove the segment
         */
     }
     else {                     /* only worry about permissions if we attached the segment */
        if (shmctl(shmid, IPC_STAT, &shmbuf) != 0) {
-           ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
+           ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
                "shmctl() could not stat segment #%d", shmid);
        }
        else {
            shmbuf.shm_perm.uid = unixd_config.user_id;
            shmbuf.shm_perm.gid = unixd_config.group_id;
            if (shmctl(shmid, IPC_SET, &shmbuf) != 0) {
-               ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
                    "shmctl() could not set segment #%d", shmid);
            }
        }
@@ -1209,7 +1208,7 @@ static void setup_shared_mem(ap_context_t *p)
      * (small) tables.
      */
     if (shmctl(shmid, IPC_RMID, NULL) != 0) {
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf,
                "shmctl: IPC_RMID: could not remove shared memory segment #%d",
                shmid);
     }
@@ -1584,7 +1583,7 @@ static void reclaim_child_processes(int terminate)
            case 3:     /* 344ms */
                /* perhaps it missed the SIGHUP, lets try again */
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
-                           server_conf,
+                           0, server_conf,
                    "child process %d did not exit, sending another SIGHUP",
                            pid);
                kill(pid, SIGHUP);
@@ -1597,14 +1596,14 @@ static void reclaim_child_processes(int terminate)
            case 7:     /* 1.4sec */
                /* ok, now it's being annoying */
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
-                           server_conf,
+                           0, server_conf,
                   "child process %d still did not exit, sending a SIGTERM",
                            pid);
                kill(pid, SIGTERM);
                break;
            case 8:     /*  6 sec */
                /* die child scum */
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, server_conf,
                   "child process %d still did not exit, sending a SIGKILL",
                            pid);
                kill(pid, SIGKILL);
@@ -1615,7 +1614,7 @@ static void reclaim_child_processes(int terminate)
                 * exited, we will likely fail to bind to the port
                 * after the restart.
                 */
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, server_conf,
                            "could not make child process %d exit, "
                            "attempting to continue anyway", pid);
                break;
@@ -1794,46 +1793,46 @@ static void set_signals(void)
        sa.sa_flags = SA_RESETHAND;
 #endif
        if (sigaction(SIGSEGV, &sa, NULL) < 0)
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGSEGV)");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGSEGV)");
 #ifdef SIGBUS
        if (sigaction(SIGBUS, &sa, NULL) < 0)
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGBUS)");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGBUS)");
 #endif
 #ifdef SIGABORT
        if (sigaction(SIGABORT, &sa, NULL) < 0)
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGABORT)");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGABORT)");
 #endif
 #ifdef SIGABRT
        if (sigaction(SIGABRT, &sa, NULL) < 0)
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGABRT)");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGABRT)");
 #endif
 #ifdef SIGILL
        if (sigaction(SIGILL, &sa, NULL) < 0)
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGILL)");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGILL)");
 #endif
        sa.sa_flags = 0;
     }
     sa.sa_handler = sig_term;
     if (sigaction(SIGTERM, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGTERM)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGTERM)");
 #ifdef SIGINT
     if (sigaction(SIGINT, &sa, NULL) < 0)
-        ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGINT)");
+        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGINT)");
 #endif
 #ifdef SIGXCPU
     sa.sa_handler = SIG_DFL;
     if (sigaction(SIGXCPU, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGXCPU)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGXCPU)");
 #endif
 #ifdef SIGXFSZ
     sa.sa_handler = SIG_DFL;
     if (sigaction(SIGXFSZ, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGXFSZ)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGXFSZ)");
 #endif
 #ifdef SIGPIPE
     sa.sa_handler = SIG_IGN;
     if (sigaction(SIGPIPE, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGPIPE)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGPIPE)");
 #endif
 
     /* we want to ignore HUPs and USR1 while we're busy processing one */
@@ -1841,9 +1840,9 @@ static void set_signals(void)
     sigaddset(&sa.sa_mask, SIGUSR1);
     sa.sa_handler = restart;
     if (sigaction(SIGHUP, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGHUP)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGHUP)");
     if (sigaction(SIGUSR1, &sa, NULL) < 0)
-       ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGUSR1)");
+       ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGUSR1)");
 #else
     if (!one_process) {
        signal(SIGSEGV, sig_coredump);
@@ -1954,7 +1953,7 @@ static void child_main(int child_num_arg)
     requests_this_child = 0;
     last_lr = NULL;
 
-    /* Get a sub ap_context_t for global allocations in this child, so that
+    /* Get a sub context for global allocations in this child, so that
      * we can have cleanups occur when the child exits.
      */
     ap_create_context(&pchild, pconf);
@@ -2028,7 +2027,7 @@ static void child_main(int child_num_arg)
                     * on Linux 2.0.x we seem to end up with EFAULT
                     * occasionally, and we'd loop forever due to it.
                     */
-                   ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, "select: (listen)");
+                   ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "select: (listen)");
                    clean_child_exit(1);
                }
 
@@ -2047,7 +2046,7 @@ static void child_main(int child_num_arg)
                }
                first_lr=lr;
                do {
-                    ap_get_os_sock(lr->sd, &sockdes);
+                    ap_get_os_sock(&sockdes, lr->sd);
                    if (FD_ISSET(sockdes, &main_fds))
                        goto got_listener;
                    lr = lr->next;
@@ -2157,24 +2156,24 @@ static void child_main(int child_num_arg)
                      * Ben Hyde noted that temporary ENETDOWN situations
                      * occur in mobile IP.
                      */
-                   ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+                   ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
                        "accept: giving up.");
                    clean_child_exit(APEXIT_CHILDFATAL);
 #endif /*ENETDOWN*/
 
 #ifdef TPF
                case EINACT:
-                   ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
+                   ap_log_error(APLOG_MARK, APLOG_EMERG, errno, server_conf,
                        "offload device inactive");
                    clean_child_exit(APEXIT_CHILDFATAL);
                    break;
                default:
-                   ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
+                   ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, server_conf,
                        "select/accept error (%u)", errno);
                    clean_child_exit(APEXIT_CHILDFATAL);
 #else
                default:
-                   ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
+                   ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
                                "accept: (client socket)");
                    clean_child_exit(1);
 #endif
@@ -2206,11 +2205,11 @@ static void child_main(int child_num_arg)
         * socket options, file descriptors, and read/write buffers.
         */
 
-        ap_get_os_sock(csd, &sockdes);
+        ap_get_os_sock(&sockdes, csd);
 
        clen = sizeof(sa_server);
        if (getsockname(sockdes, &sa_server, &clen) < 0) {
-           ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, "getsockname");
+           ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
            ap_close_socket(csd);
            continue;
        }
@@ -2220,13 +2219,13 @@ static void child_main(int child_num_arg)
        iol = unix_attach_socket(sockdes);
        if (iol == NULL) {
            if (errno == EBADF) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, NULL,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL,
                    "filedescriptor (%u) larger than FD_SETSIZE (%u) "
                    "found, you probably need to rebuild Apache with a "
                    "larger FD_SETSIZE", sockdes, FD_SETSIZE);
            }
            else {
-               ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
+               ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
                    "error attaching to socket");
            }
            ap_close_socket(csd);
@@ -2279,7 +2278,7 @@ static int make_child(server_rec *s, int slot, time_t now)
 #else
     if ((pid = fork()) == -1) {
 #endif
-       ap_log_error(APLOG_MARK, APLOG_ERR, s, "fork: Unable to fork new process");
+       ap_log_error(APLOG_MARK, APLOG_ERR, errno, s, "fork: Unable to fork new process");
 
        /* fork didn't succeed. Fix the scoreboard or else
         * it will say SERVER_STARTING forever and ever
@@ -2432,7 +2431,7 @@ static void perform_idle_server_maintenance(void)
            static int reported = 0;
 
            if (!reported) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, server_conf,
                            "server reached MaxClients setting, consider"
                            " raising the MaxClients setting");
                reported = 1;
@@ -2441,7 +2440,7 @@ static void perform_idle_server_maintenance(void)
        }
        else {
            if (idle_spawn_rate >= 8) {
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, server_conf,
                    "server seems busy, (you may need "
                    "to increase StartServers, or Min/MaxSpareServers), "
                    "spawning %d children, there are %d idle, and "
@@ -2485,7 +2484,7 @@ static void process_child_status(int pid, ap_wait_t status)
        */
     if ((WIFEXITED(status)) &&
        WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
-       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, server_conf,
                        "Child %d returned a Fatal error... \n"
                        "Apache is exiting!",
                        pid);
@@ -2503,7 +2502,7 @@ static void process_child_status(int pid, ap_wait_t status)
 #ifdef WCOREDUMP
            if (WCOREDUMP(status)) {
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            server_conf,
+                            0, server_conf,
                             "child pid %d exit signal %s (%d), "
                             "possible coredump in %s",
                             pid, (WTERMSIG(status) >= NumSIG) ? "" : 
@@ -2513,7 +2512,7 @@ static void process_child_status(int pid, ap_wait_t status)
            else {
 #endif
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
-                            server_conf,
+                            0, server_conf,
                             "child pid %d exit signal %s (%d)", pid,
                             SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
 #ifdef WCOREDUMP
@@ -2536,7 +2535,7 @@ static int setup_listeners(server_rec *s)
     int sockdes;
 
     if (ap_listen_open(s->process, s->port)) {
-       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
+       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
                    "no listening sockets available, shutting down");
        return -1;
     }
@@ -2544,7 +2543,7 @@ static int setup_listeners(server_rec *s)
     listenmaxfd = -1;
     FD_ZERO(&listenfds);
     for (lr = ap_listeners; lr; lr = lr->next) {
-        ap_get_os_sock(lr->sd, &sockdes);
+        ap_get_os_sock(&sockdes, lr->sd);
        FD_SET(sockdes, &listenfds);
        if (sockdes > listenmaxfd) {
            listenmaxfd = sockdes;
@@ -2611,10 +2610,10 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
        hold_off_on_exponential_spawning = 10;
     }
 
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, server_conf,
                "%s configured -- resuming normal operations",
                ap_get_server_version());
-    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf,
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, server_conf,
                "Server built: %s", ap_get_server_built());
     restart_pending = shutdown_pending = 0;
 
@@ -2654,7 +2653,8 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
                    * scoreboard.  Somehow we don't know about this
                    * child.
                    */
-               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, server_conf,
+               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 
+                            0, server_conf,
                            "long lost child came home! (pid %d)", pid);
            }
            /* Don't perform idle maintenance when a child dies,
@@ -2691,7 +2691,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
         * Kill child processes, tell them to call child_exit, etc...
         */
        if (ap_killpg(getpgrp(), SIGTERM) < 0) {
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "killpg SIGTERM");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "killpg SIGTERM");
        }
        reclaim_child_processes(1);             /* Start with SIGTERM */
 
@@ -2701,12 +2701,12 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
            pidfile = ap_server_root_relative (pconf, ap_pid_fname);
            if ( pidfile != NULL && unlink(pidfile) == 0)
                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,
-                               server_conf,
+                               0, server_conf,
                                "removed PID file %s (pid=%ld)",
                                pidfile, (long)getpid());
        }
 
-       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, server_conf,
                    "caught SIGTERM, shutting down");
        return 1;
     }
@@ -2732,12 +2732,12 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
 #ifndef SCOREBOARD_FILE
        int i;
 #endif
-       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, server_conf,
                    "SIGUSR1 received.  Doing graceful restart");
 
        /* kill off the idle ones */
        if (ap_killpg(getpgrp(), SIGUSR1) < 0) {
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "killpg SIGUSR1");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "killpg SIGUSR1");
        }
 #ifndef SCOREBOARD_FILE
        /* This is mostly for debugging... so that we know what is still
@@ -2756,10 +2756,10 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
     else {
        /* Kill 'em off */
        if (ap_killpg(getpgrp(), SIGHUP) < 0) {
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "killpg SIGHUP");
+           ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "killpg SIGHUP");
        }
        reclaim_child_processes(0);             /* Not when just starting up */
-       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
+       ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, server_conf,
                    "SIGHUP received.  Attempting to restart");
     }
 
@@ -2968,6 +2968,18 @@ API_EXPORT(void) ap_thread_mutex_destroy(ap_thread_mutex *mtx)
     free(mtx);
 }
 
+/* Stub functions until this MPM supports the connection status API */
+
+API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, \
+                                             const char *value)
+{
+    /* NOP */
+}
+
+API_EXPORT(void) ap_reset_connection_status(long conn_id)
+{
+    /* NOP */
+}
 
 static const command_rec prefork_cmds[] = {
 UNIX_DAEMON_COMMANDS