I found this for Squid 3.1.20-2.2 package for Debian Wheezy.
$ vim /etc/init.d/squid3
...
78
79 stop () {
80 PID=`cat $PIDFILE 2>/dev/null`
81 start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
82 #
83 # Now we have to wait until squid has _really_ stopped.
84 #
85 sleep 2
86 if test -n "$PID" && kill -0 $PID 2>/dev/null
87 then
88 log_action_begin_msg " Waiting"
89 cnt=0
90 while kill -0 $PID 2>/dev/null
91 do
92 cnt=`expr $cnt + 1`
93 if [ $cnt -gt 24 ]
94 then
95 log_action_end_msg 1
96 return 1
97 fi
98 sleep 5
99 log_action_cont_msg ""
100 done
101 log_action_end_msg 0
102 return 0
103 else
104 return 0
105 fi
106 }
107...
, this function is using this unrecognized signal (0).
Workaround: at line 90, change the signal to a SIGTERM signal like, 15.
90 while kill -15 $PID 2>/dev/null
Then, there will be no delays when starting/stopping Squid:
$ time /etc/init.d/squid3 stop
[ ok ] Stopping Squid HTTP Proxy 3.x: squid3.
real 0m2.036s
user 0m0.004s
sys 0m0.000s
$ time /etc/init.d/squid3 start
[ ok ] Starting Squid HTTP Proxy 3.x: squid3.
real 0m0.036s
user 0m0.004s
sys 0m0.004s
Beware: although it provides fast start/stop for the service, this workaround could break the purpose of the script, which uses signal 0 for its own reasons.