[MacPorts] #33436: Squid3 fails to start with launchctl start, but does start with launchctl stop
MacPorts
noreply at macports.org
Fri Mar 2 09:48:02 PST 2012
#33436: Squid3 fails to start with launchctl start, but does start with launchctl
stop
--------------------------------------+-------------------------------------
Reporter: dan+macports@… | Owner: jmr@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.3
Keywords: | Port: squid3
--------------------------------------+-------------------------------------
Comment(by jmr@…):
I just tested and launchctl stop does kill daemondo. However, telling
launchctl to stop a job that is marked KeepAlive (as all daemondo jobs
are) will only stop it as long as it takes for launchd to detect it's
stopped and restart it. And of course starting a job that is already
running does nothing.
So that just leaves restart, and I think that is problematic because squid
takes 30 seconds to shut down cleanly, so it's not done yet when the Start
command is run immediately afterwards. Daemondo actually has a --restart-
wait option that would be suited to this, but unfortunately the
portstartupitem code doesn't provide an interface to it, and also insists
on passing an explicit --restart-cmd when using a wrapper script, which
bypasses the built-in code that would do the waiting.
So the options would appear to be: 1. Kill squid outright instead of
asking it to shut down cleanly; or 2. Insert a sleep into the restart
command. The former could be problematic for obvious reasons, and the
latter could also be problematic because the shutdown time is configurable
(shutdown_lifetime in squid.conf).
--
Ticket URL: <https://trac.macports.org/ticket/33436#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list