[MacPorts] #33436: Squid3 fails to start with launchctl start, but does start with launchctl stop

MacPorts noreply at macports.org
Fri Mar 2 07:25:09 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 dan+macports@…):

 I have pinpointed the problem to a problem in a way "daemondo"
 does a restart on any network change.
 When a network change occurs, daemondo does:
     ${prefix}/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart
 .

 Unfortunately this "Squid.wrapper restart" does work as a switch:

 {{{
 # ./Squid.wrapper restart
 # ps ax | grep '[(]squid'
 #
 ### nothing: in fact Squid.wrapper did the Stop and not the Start

 # ./Squid.wrapper restart
 squid: No running copy
 # ps ax | grep '[(]squid'
  4781   ??  S      0:00.02 (squid) -s
 #
 ### this time Squid.wrapper failed the Stop and did the Start
 }}}

 Squid.wrapper is killing the actual squid daemon if it's running and
 doesn't
 start a new one.
 If no running daemon is there, the Stop fails and the Start works.

 A network change does occurs during the boot of MacOS X… just after
 launchd
 launched the first squid daemon. Hence this first call to "Squid.wrapper
 restart"
 does a "Stop". This is the reason why squid never starts on its own during
 normal boot, when a "launchd stop org.macports.Squid" does start it.

-- 
Ticket URL: <https://trac.macports.org/ticket/33436#comment:3>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list