]> granicus.if.org Git - apache/commitdiff
kill -l requires the short version of the signal (without SIG prefix).
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 21 Sep 2001 14:57:43 +0000 (14:57 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 21 Sep 2001 14:57:43 +0000 (14:57 +0000)
(apachectl graceful was broken.)

The best way to do this is to change configure to internally represent
the signal without the SIG prefix and prepend SIG before substitution
(and export a version without the SIG prefix for apachectl).

This highlights why we want to move apachectl's core functionality into
httpd.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91102 13f79535-47bb-0310-9956-ffa450edef68

configure.in
support/apachectl.in

index 6c5a809a1301c32a758ea4c82fa3d412d9749912..bce59dac831e39499e882b5e152396c411d197cb 100644 (file)
@@ -142,7 +142,7 @@ esac
 APACHE_SUBST(SHLTCFLAGS)
 APACHE_SUBST(LTCFLAGS)
 
-AP_SIG_GRACEFUL=SIGUSR1
+AP_SIG_GRACEFUL=USR1
 
 case $host in
   *-apple-aux3*)
@@ -160,7 +160,7 @@ case $host in
   *-linux-*)
       case `uname -r` in
         2.0* ) 
-            AP_SIG_GRACEFUL=SIGWINCH
+            AP_SIG_GRACEFUL=WINCH
             ;;
         2.[[2-9]]* ) 
             APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
@@ -353,9 +353,14 @@ if test "$SINGLE_LISTEN_UNSERIALIZED_ACCEPT" = "1"; then
               [This platform doesn't suffer from the thundering herd problem])
 fi
 
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL, $AP_SIG_GRACEFUL, [Signal used to gracefully restart])
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_STRING, "$AP_SIG_GRACEFUL", [Signal used to gracefully restart (as a quoted string)])
+AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL, SIG$AP_SIG_GRACEFUL, [Signal used to gracefully restart])
+AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_STRING, "SIG$AP_SIG_GRACEFUL", [Signal used to gracefully restart (as a quoted string)])
+AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_SHORT, $AP_SIG_GRACEFUL, [Signal used to gracefully restart (without SIG prefix)])
+AP_SIG_GRACEFUL_SHORT=$AP_SIG_GRACEFUL
+AP_SIG_GRACEFUL=SIG$AP_SIG_GRACEFUL_SHORT
 AC_SUBST(AP_SIG_GRACEFUL)
+AC_SUBST(AP_SIG_GRACEFUL_STRING)
+AC_SUBST(AP_SIG_GRACEFUL_SHORT)
 
 dnl check for endianness
 if test "$cross_compiling" = "no"; then
index c37f275d98d6bc1a64e8e68f84c1d43bde0ce4fc..8d0043bdd810363601dd31456abf435deea0a009 100644 (file)
@@ -125,7 +125,7 @@ do
            fi
        else
            if $HTTPD -t >/dev/null 2>&1; then
-               if kill -@AP_SIG_GRACEFUL@ $PID ; then
+               if kill -@AP_SIG_GRACEFUL_SHORT@ $PID ; then
                    echo "$0 $ARG: httpd gracefully restarted"
                else
                    echo "$0 $ARG: httpd could not be restarted"