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