]> git.pld-linux.org Git - packages/pdnsd.git/commitdiff
- fixed signals handling with threads.
authorTomasz Pala <gotar@pld-linux.org>
Mon, 24 Jun 2002 04:50:20 +0000 (04:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pdnsd-threads_signals.patch -> 1.1
    pdnsd.init -> 1.8

pdnsd-threads_signals.patch [new file with mode: 0644]
pdnsd.init

diff --git a/pdnsd-threads_signals.patch b/pdnsd-threads_signals.patch
new file mode 100644 (file)
index 0000000..3846b74
--- /dev/null
@@ -0,0 +1,19 @@
+diff -u -r1.3 thread.h
+--- src/thread.h       19 May 2001 14:57:30 -0000      1.3
++++ src/thread.h       23 Jun 2002 11:23:35 -0000
+@@ -44,6 +44,7 @@
+  * under Linux. Also, sigwait() does not seem to work as indicated in the docs */
+ #if TARGET==TARGET_LINUX
+ #define THREAD_SIGINIT        do { pthread_sigmask(SIG_UNBLOCK,&sigs_msk,NULL);  \
++                             signal(SIGINT,thread_sig);                    \
+                              signal(SIGILL,thread_sig);                    \
+                            signal(SIGABRT,thread_sig);                   \
+                            signal(SIGFPE,thread_sig);                    \
+@@ -51,6 +52,7 @@
+                            signal(SIGTSTP,thread_sig);                   \
+                              signal(SIGTTOU,thread_sig);                   \
+                            signal(SIGTTIN,thread_sig);                   \
++                             signal(SIGTERM, thread_sig);                  \
+                              signal(SIGPIPE, SIG_IGN);                     \
+                         } while (0);
index d5c65a856f604a28c8ec8eaa547ec6b7b44ed289..bd153ba30b16c848b54f9e7e4a672cf3243eef21 100644 (file)
@@ -41,31 +41,17 @@ case "$1" in
        # Stop daemons.
        # show "Stopping %s service" pdns
        if [ -f /var/lock/subsys/pdns ]; then
-
-#      1.      killproc causes pdnsd not to save cache file on exit.
-#              The only signals not doing this are 4, 6, 8 and 11.
-#              These signals terminate this script anyway.
-#      2.      killproc tries to kill all found processes. In this
-#              case they are connected and die together, so doing
-#              this will print errors on screen.
-
-#              msg_stopping Pdns
-#              killproc pdnsd
-
-               echo "Stopping Pdns service"
-
+               msg_stopping Pdns
+               killproc pdnsd
                rm -f /var/lock/subsys/pdns >/dev/null 2>&1
-               
-               killall -FPE pdnsd
-               
        else
                msg_Not_Running Pdns
                exit 1
-       fi      
+       fi
        ;;
   restart)
-       echo "Due to a pdnsd bug you must start it manually."
        $0 stop
+       $0 start
        ;;
   reload)
        if [ -f /var/lock/subsys/pdns ]; then
@@ -74,7 +60,7 @@ case "$1" in
                busy
                killproc pdnsd -HUP
                deltext
-               ok              
+               ok
        else
                msg_Not_Running Pdns
                exit 1
@@ -86,7 +72,7 @@ case "$1" in
        exit $?
 
        # or if it doesn't
-       $0 restart
+       $0 stop && $0 start
        exit $?
        ;;
   status)
This page took 0.065105 seconds and 4 git commands to generate.