[00:59] <jMCg> how do I tell upstart's stop to kill all children of a process too?
[01:00] <jMCg> https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=blob_plain;f=rc/trafficserver.conf.in;hb=HEAD
[01:01] <jMCg> HRM. I don't have expect fork in my version. Maybe that's it.
[16:46] <jMCg> Oy, no answer here :-/
[16:57] <SpamapS> jMCg: IIRC upstart will kill the entire "process group"
[16:59] <jMCg> SpamapS: but it doesn't
[17:01] <SpamapS> jMCg: actually no, I see now, it just kills the tracked pid
[17:01] <jMCg> SpamapS: sometimes I miss SMF
[17:05] <SpamapS> jMCg: really though, a parent that doesn't kill its children off on SIGTERM is misbehaving. ;)
[17:08] <SpamapS> jMCg: ok, so if I understand my "process group" mechanics correctly, kill() to a pid that is a process group leader will be delivered to all process group members.
[17:23] <SpamapS> hrm no I misread that
[17:23] <SpamapS> have to send to -pid to get the process group
[17:34] <jMCg> SpamapS: thing is, this is a controll process, and it's children, so really, what I need is a way to tell upstart how *really* to reload or restart the. thing.
[17:34] <SpamapS> jMCg: you can change the normal kill signal
[17:34] <SpamapS> unfortunately, not the reload signal
[17:35] <SpamapS> jMCg: so if SIGTERM is too violent/handled poorly by that process.. then you canchange to whatever is the more graceful way to shutdown
[17:35] <SpamapS> but ultimately, SIGHUP needs to be handled well
[17:35] <jMCg> SpamapS: I'll have to discuss that with my peers, the thing is: We start traffic_cop in upstart, whic starts traffic_manager, which starts traffic_server which oh fuck me.
[17:36] <jMCg> I mean, gimme a sec, I might have done something wrongishly.
[17:36] <jMCg> https://issues.apache.org/jira/browse/TS-755
[17:37] <jMCg> Okay, that doesn't really affect anything here.
[17:37] <jMCg> Maybe I need to tell upstart to expect fork?
[17:38] <jMCg> Lemme try that.
[17:38]  * SpamapS reads upstart code again
[17:39] <jMCg> Yes, I do need to do that. As I correctly do in the code I have up on apache's git ;)
[17:39] <jMCg> So why did I do it wrong in my installation? I don't know.
[17:40] <jMCg> Of course this is a really not very graceful way of restarting the thing.
[17:40] <SpamapS> jMCg: ok, I can confirm, upstart kills the whole process group / session
[17:40] <SpamapS>     if (kill (pgid > 0 ? -pgid : pid, signal) < 0)
[17:40] <SpamapS>         nih_return_system_error (-1);
[17:40] <jMCg> SpamapS: with expect fork, or even without?
[17:41] <SpamapS> jMCg: no matter what
[17:41] <SpamapS> expect fork just helps it figure out the pid
[17:43] <SpamapS> jMCg: actually, reload does not send to the group
[17:43] <SpamapS>     if (kill (processes[0]->item1, SIGHUP) < 0) {
[17:43] <SpamapS> which makes sense
[17:43] <SpamapS> its not trying to clean up, its trying to tell the main process to reload its configuration
[17:45] <jMCg> SpamapS: I need to test if this will work, and if does, adapt a new workflow.
[17:47] <jMCg> SpamapS: it would appear as though it works!
[17:49] <SpamapS> jMCg: \o/
[17:51] <jMCg> We did something right in our code!