=== Stevee_ is now known as Stevee === Stevee is now known as stevee [22:18] Hey guys. [22:18] hi [22:21] I'm trying to write an init script for trafficserver. The start really works simple -- but the problem is the stop. [22:22] upstart doesn't clean up all the children: when I start traffic_cop, that will spawn traffic_manager which will spawn traffic_server - so a stop needs to stop all these. [22:22] an init script or an upstart conf file? [22:23] upstart should clean them all up unless they break session [22:23] ps -j ax [22:23] can you paste the relevant bit for those scripts? [22:24] http://pastebin.com/BnDmvNZ3 [22:24] no, I mean the relevant part of the ps output [22:24] also that "&" is totally not meant to be there, right? :p [22:25] Keybuk: yes, they seeem to do that. [22:26] http://pastebin.com/9mGVpe7F [22:26] I'm a little confuzzled - I wonder how that looks in Solaris. [22:27] yeah they broke session [22:27] Upstart kills everything in the process group it knows about [22:27] which in this case is 26499 [22:27] How does one break sessions? [22:27] so it wouldn't kill anything in 26504 [22:27] setsid() [22:28] Why would it make sense to start a new session? [22:28] who knows [22:29] oh man, I love comments like this: setsid(); // Important, thanks Vlad. :) [22:30] Well, that's in traffic_cop, and then there's one in traffic_manager, it seems. [22:30] while ((setsid() == (pid_t) - 1) && (errno == EINTR)) { [22:30] so yeah, if killing one doesn't clean up its own mess, meh [22:35] Solaris has a different way to track this. They do so via contracts. [22:36] That's why this https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/rc/trafficserver.xml.in works on Solaris, but this: http://pastebin.com/BnDmvNZ3 doesn't work on Linux. [22:36] there are ways to do that on Linux too [22:38] jMCg: isn't there a way to tell trafficserver to shut down everything? [22:39] JanC: "trafficserver" is a rather fragile script that tracks pids and does that. [22:39] JanC: https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/rc/trafficserver.in [22:40] Keybuk: such as? [22:40] cgroups [22:41] http://www.freebsd.org/cgi/man.cgi?query=ctrun&apropos=0&sektion=0&manpath=SunOS+5.10&format=html [22:42] Keybuk: anyway, you think it'll do any harm to remove the above while loop from the second-in-line daemon? [22:42] no idea [22:42] without knowing why Vlad thinks it's important ;) [22:42] Nonono. That's in the first daemon. [22:42] And I don't even know who that guy is. We don't have a Vlad on the project right now. [22:43] (But we have two Igors, me being one of them)