You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1999/10/20 21:07:52 UTC

cvs commit: apache-2.0/src/modules/mpm/dexter acceptlock.c dexter.c scoreboard.c

manoj       99/10/20 12:07:51

  Modified:    src/modules/mpm/dexter acceptlock.c dexter.c scoreboard.c
  Log:
  Fix dexter after adding a status code to ap_log_error broke it.
  
  Revision  Changes    Path
  1.14      +19 -14    apache-2.0/src/modules/mpm/dexter/acceptlock.c
  
  Index: acceptlock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/acceptlock.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- acceptlock.c	1999/10/14 14:36:39	1.13
  +++ acceptlock.c	1999/10/20 19:07:48	1.14
  @@ -123,7 +123,7 @@
   void intra_mutex_on(int locknum)
   {
       if ((errno = pthread_mutex_lock(&intra_mutex[locknum])) != 0) {
  -        ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, errno,  
   		     (const server_rec *) ap_get_server_conf(),
   		     "Error getting intraprocess lock. Exiting!");
       }
  @@ -132,7 +132,7 @@
   void intra_mutex_off(int locknum)
   {
       if (pthread_mutex_unlock(&intra_mutex[locknum]) != 0) {
  -        ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, errno,  
   		     (const server_rec *) ap_get_server_conf(),
   		     "Error releasing intraprocess lock. Exiting!");
       }
  @@ -531,7 +531,8 @@
       }
   
       if (ret < 0) {
  -	ap_log_error(APLOG_MARK, APLOG_EMERG, (const server_rec*) ap_get_server_conf(),
  +	ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
  +                    (const server_rec*) ap_get_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!");
  @@ -548,10 +549,11 @@
   	/* nop */
       }
       if (ret < 0) {
  -	ap_log_error(APLOG_MARK, APLOG_EMERG, (const server_rec*) ap_get_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!");
  +	ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
  +                     (const server_rec*) ap_get_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!");
   	ap_clean_child_exit(APEXIT_CHILDFATAL);
       }
   }
  @@ -587,7 +589,7 @@
           ap_open(&tempfile, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, p);
           ap_get_os_file(&lock_fd[i], tempfile);
           if (lock_fd[i] == -1) {
  -	  ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +	  ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
   		       (const server_rec *)ap_get_server_conf(),
   		       "Child cannot open lock file: %s", lock_fname);
   	  ap_clean_child_exit(APEXIT_CHILDINIT);
  @@ -614,7 +616,7 @@
           ap_open(&tempfile, lock_fname, APR_CREATE | APR_WRITE | APR_EXCL, APR_UREAD | APR_UWRITE, p);
           ap_get_os_file(&lock_fd[i], tempfile);
           if (lock_fd[i] == -1) {
  -	    ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +	    ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
   			 (const server_rec *) ap_get_server_conf(), 
   			 "Parent cannot open lock file: %s", lock_fname);
               exit(APEXIT_INIT);
  @@ -631,7 +633,7 @@
           continue;
   
       if (ret < 0) {
  -        ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
   		     (const server_rec *) ap_get_server_conf(),
   		     "flock: LOCK_EX: Error getting accept lock. Exiting!");
   	ap_clean_child_exit(APEXIT_CHILDFATAL);
  @@ -641,7 +643,7 @@
   void accept_mutex_off(int locknum)
   {
       if (flock(lock_fd[locknum], LOCK_UN) < 0) {
  -        ap_log_error(APLOG_MARK, APLOG_EMERG, 
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
   		     (const server_rec *) ap_get_server_conf(),
   		     "flock: LOCK_UN: Error freeing accept lock. Exiting!");
   	ap_clean_child_exit(APEXIT_CHILDFATAL);
  @@ -675,7 +677,8 @@
           int rc = DosOpenMutexSem(NULL, &lock_sem[locknum]);
   
   	if (rc != 0) {
  -	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, ap_get_server_conf(),
  +	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, errno,
  +                         ap_get_server_conf(),
   			 "Child cannot open lock semaphore, rc=%d", rc);
   	    ap_clean_child_exit(APEXIT_CHILDINIT);
   	}
  @@ -711,7 +714,8 @@
       int rc = DosRequestMutexSem(lock_sem[locknum], SEM_INDEFINITE_WAIT);
   
       if (rc != 0) {
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, ap_get_server_conf(),
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, errno,
  +                     ap_get_server_conf(),
   		    "OS2SEM: Error %d getting accept lock. Exiting!", rc);
   	ap_clean_child_exit(APEXIT_CHILDFATAL);
       }
  @@ -722,7 +726,8 @@
       int rc = DosReleaseMutexSem(lock_sem[locknum]);
       
       if (rc != 0) {
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, ap_get_server_conf(),
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, errno,
  +                     ap_get_server_conf(),
   		    "OS2SEM: Error %d freeing accept lock. Exiting!", rc);
   	ap_clean_child_exit(APEXIT_CHILDFATAL);
       }
  
  
  
  1.45      +54 -46    apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -d -u -r1.44 -r1.45
  --- dexter.c	1999/10/13 20:14:51	1.44
  +++ dexter.c	1999/10/20 19:07:49	1.45
  @@ -353,7 +353,7 @@
   	    case 6:     /* 344ms */
   	    case 7:     /* 1.4sec */
   		/* ok, now it's being annoying */
  -		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
  +		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno,
   			    server_conf,
   		   "child process %d still did not exit, sending a SIGTERM",
   			    pid);
  @@ -361,7 +361,8 @@
   		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, errno,
  +                             server_conf,
   		   "child process %d still did not exit, sending a SIGKILL",
   			    pid);
   		kill(pid, SIGKILL);
  @@ -372,7 +373,8 @@
   		 * 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, errno,
  +                             server_conf,
   			    "could not make child process %d exit, "
   			    "attempting to continue anyway", pid);
   		break;
  @@ -544,46 +546,46 @@
   	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 WINCH while we're busy processing one */
  @@ -591,9 +593,9 @@
       sigaddset(&sa.sa_mask, SIGWINCH);
       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(SIGWINCH, &sa, NULL) < 0)
  -	ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGWINCH)");
  +	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, "sigaction(SIGWINCH)");
   #else
       if (!one_process) {
   	signal(SIGSEGV, sig_coredump);
  @@ -638,7 +640,7 @@
   	*/
       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, errno, server_conf,
   			"Child %d returned a Fatal error... \n"
   			"Apache is exiting!",
   			pid);
  @@ -655,7 +657,7 @@
   #ifdef SYS_SIGLIST
   #ifdef WCOREDUMP
   	    if (WCOREDUMP(status)) {
  -		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
  +		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno,
   			     server_conf,
   			     "child pid %d exit signal %s (%d), "
   			     "possible coredump in %s",
  @@ -665,7 +667,7 @@
   	    }
   	    else {
   #endif
  -		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
  +		ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno,
   			     server_conf,
   			     "child pid %d exit signal %s (%d)", pid,
   			     SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status));
  @@ -673,7 +675,7 @@
   	    }
   #endif
   #else
  -	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE,
  +	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno,
   			 server_conf,
   			 "child pid %d exit signal %d",
   			 pid, WTERMSIG(status));
  @@ -716,7 +718,7 @@
   
       if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
   		   sizeof(int)) < 0) {
  -	ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf,
  +	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf,
   		    "setsockopt: (TCP_NODELAY)");
       }
   }
  @@ -745,7 +747,7 @@
       ap_iol *iol;
   
       if (getsockname(csd, &sa_server, &len) < 0) { 
  -	ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, "getsockname");
  +	ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
   	close(csd);
   	return;
       }
  @@ -755,13 +757,13 @@
       iol = unix_attach_socket(csd);
       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, errno, NULL,
                   "filedescriptor (%u) larger than FD_SETSIZE (%u) "
                   "found, you probably need to rebuild Apache with a "
                   "larger FD_SETSIZE", csd, FD_SETSIZE);
           }
           else {
  -            ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
  +            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
                   "error attaching to socket");
           }
           close(csd);
  @@ -790,7 +792,7 @@
       if (worker_thread_count < max_threads) {
           if (pthread_create(&thread, &worker_thread_attr, worker_thread,
   	  &worker_thread_free_ids[worker_thread_count])) {
  -            ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
  +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, server_conf,
                            "pthread_create: unable to create worker thread");
               /* In case system resources are maxxed out, we don't want
                  Apache running away with the CPU trying to fork over and
  @@ -808,7 +810,7 @@
           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, errno, server_conf,
                            "server reached MaxThreadsPerChild setting, consider raising the"
                            " MaxThreadsPerChild or NumServers settings");
               reported = 1;
  @@ -896,7 +898,7 @@
   
                   /* poll() will only return errors in catastrophic
                    * circumstances. Let's try exiting gracefully, for now. */
  -                ap_log_error(APLOG_MARK, APLOG_ERR, (const server_rec *)
  +                ap_log_error(APLOG_MARK, APLOG_ERR, errno, (const server_rec *)
                                ap_get_server_conf(), "poll: (listen)");
                   workers_may_exit = 1;
               }
  @@ -1001,7 +1003,8 @@
       sigfillset(&sig_mask);
   
       if (pthread_sigmask(SIG_SETMASK, &sig_mask, NULL) != 0) {
  -        ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf, "pthread_sigmask");
  +        ap_log_error(APLOG_MARK, APLOG_ALERT, errno, server_conf,
  +                     "pthread_sigmask");
       }
   
       requests_this_child = max_requests_per_child;
  @@ -1054,7 +1057,7 @@
               just_die(signal_received);
               break;
           default:
  -            ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
  +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, server_conf,
               "received impossible signal: %d", signal_received);
               just_die(SIGTERM);
       }
  @@ -1076,7 +1079,8 @@
       }
   
       if ((pid = fork()) == -1) {
  -        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");
   	/* In case system resources are maxxed out, we don't want
   	   Apache running away with the CPU trying to fork over and
   	   over and over again. */
  @@ -1094,8 +1098,8 @@
           int status = bindprocessor(BINDPROCESS, (int)getpid(),
   			       PROCESSOR_CLASS_ANY);
   	if (status != OK)
  -	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, server_conf,
  -			 "processor unbind failed %d", status);
  +	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, 
  +                         server_conf, "processor unbind failed %d", status);
   #endif
   
           RAISE_SIGSTOP(MAKE_CHILD);
  @@ -1242,7 +1246,8 @@
   		 * child table.  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, errno, 
  +                             server_conf,
   			    "long lost child came home! (pid %d)", pid);
   	    }
   	    /* Don't perform idle maintenance when a child dies,
  @@ -1286,7 +1291,7 @@
       pconf = _pconf;
       server_conf = s;
       if (pipe(pipe_of_death) == -1) {
  -        ap_log_error(APLOG_MARK, APLOG_ERR,
  +        ap_log_error(APLOG_MARK, APLOG_ERR, errno,
                        (const server_rec*) server_conf,
                        "pipe: (pipe_of_death)");
           exit(1);
  @@ -1294,7 +1299,7 @@
       ap_register_cleanup(pconf, &pipe_of_death[0], cleanup_fd, cleanup_fd);
       ap_register_cleanup(pconf, &pipe_of_death[1], cleanup_fd, cleanup_fd);
       if (fcntl(pipe_of_death[0], F_SETFD, O_NONBLOCK) == -1) {
  -        ap_log_error(APLOG_MARK, APLOG_ERR,
  +        ap_log_error(APLOG_MARK, APLOG_ERR, errno,
                        (const server_rec*) server_conf,
                        "fcntl: O_NONBLOCKing (pipe_of_death)");
           exit(1);
  @@ -1302,7 +1307,7 @@
       server_conf = s;
       if ((num_listenfds = setup_listeners(server_conf)) < 1) {
           /* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
  -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
  +        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, errno, s,
               "no listening sockets available, shutting down");
           return 1;
       }
  @@ -1339,10 +1344,10 @@
   	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, errno, 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, errno, server_conf,
   		"Server built: %s", ap_get_server_built());
       restart_pending = shutdown_pending = 0;
   
  @@ -1353,7 +1358,8 @@
            * 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 */
       
  @@ -1362,14 +1368,14 @@
               const char *pidfile = NULL;
               pidfile = ap_server_root_relative (pconf, ap_pid_fname);
               if ( pidfile != NULL && unlink(pidfile) == 0)
  -                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,
  +                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, errno,
               		 server_conf,
               		 "removed PID file %s (pid=%ld)",
               		 pidfile, (long)getpid());
           }
       
  -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
  -            "caught SIGTERM, shutting down");
  +        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno,
  +                     server_conf, "caught SIGTERM, shutting down");
       
   	return 1;
       }
  @@ -1385,7 +1391,7 @@
       if (is_graceful) {
           char char_of_death = '!';
   
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno, server_conf,
   		    "SIGWINCH received.  Doing graceful restart");
   
   	/* This is mostly for debugging... so that we know what is still
  @@ -1401,7 +1407,8 @@
           for (i = 0; i < num_daemons;) {
               if (write(pipe_of_death[1], &char_of_death, 1) == -1) {
                   if (errno == EINTR) continue;
  -                ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "write pipe_of_death");
  +                ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf,
  +                             "write pipe_of_death");
               }
               i++;
           }
  @@ -1412,11 +1419,12 @@
          * pthreads are stealing signals from us left and right.
          */
   	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 */
  -	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
  -		    "SIGHUP received.  Attempting to restart");
  +	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno,
  +                     server_conf, "SIGHUP received.  Attempting to restart");
       }
       return 0;
   }
  
  
  
  1.8       +11 -9     apache-2.0/src/modules/mpm/dexter/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/scoreboard.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -d -u -r1.7 -r1.8
  --- scoreboard.c	1999/10/18 22:41:04	1.7
  +++ scoreboard.c	1999/10/20 19:07:49	1.8
  @@ -343,18 +343,19 @@
       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, errno,
  +                         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, errno, server_conf,
   		"created shared memory segment #%d", shmid);
   
   #ifdef MOVEBREAK
  @@ -368,28 +369,29 @@
        * attach the segment and then move break back down. Ugly
        */
       if ((obrk = sbrk(MOVEBREAK)) == (char *) -1) {
  -	ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
  +	ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
   	    "sbrk() could not move break");
       }
   #endif
   
   #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);
   	    }
   	}
  @@ -399,7 +401,7 @@
        * (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);
       }
  @@ -410,7 +412,7 @@
       if (obrk == (char *) -1)
   	return;			/* nothing else to do */
       if (sbrk(-(MOVEBREAK)) == (char *) -1) {
  -	ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,
  +	ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf,
   	    "sbrk() could not move break back");
       }
   #endif