On stop, the service script of squid waits for the pid file to disappear even if there is no squid running that could remove it. Reproduce: - start squid - kill squid - stop squid The problem in the /etc/init.d/squid file: /usr/sbin/squid -k shutdown terminates with exit status 1 when the process is not there anymore (the pid file still is). Which means the stop script waits for no reason. I changed stop() { ebegin "Stopping ${SVCNAME}" /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf # Now we have to wait until squid has _really_ stopped. to stop() { ebegin "Stopping ${SVCNAME}" if ! /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf; then einfo "Squid couldn't shutdown. Probably already down." eend 0 return fi # Now we have to wait until squid has _really_ stopped. not sure if that is the correct error code (eend). Either way, this solves the unnecessary (long) wait. This is the same as Bug #189005, which was resolved as upstream. The bug (poorly described) is the Gentoo init script though. Please consider applying the changes.
eend 0 must be correct, or else /etc/init.d/squid will not set state to "stopped". I think we must replace einfo with ewarn or even eerror, because it is not good thing.
Fixed in cvs.
Thank you