--- /dev/null
+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);
+
# 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
busy
killproc pdnsd -HUP
deltext
- ok
+ ok
else
msg_Not_Running Pdns
exit 1
exit $?
# or if it doesn't
- $0 restart
+ $0 stop && $0 start
exit $?
;;
status)