Sean writes: > Tom Whitten wrote: > > Sean Wilcox writes: > > > >> Fixing the code as was talked about for the restart timer bugs, I did > >> find that the exit status was being captured in the wait.c code, > >> providing a way to track this. And added the code to check if status > >> was 0 then reset the timers if not do not reset the timers. > >> > >> And it seemed to be working nicely but as I was writing up a couple unit > >> tests to add to the manual console-login testing I did, I found the > >> following in the man page of svc.startd(1M): > >> > >> "Wait" model services are restarted whenever the child pro- > >> cess associated with the service exits. A child process that > >> exits is not considered an error for "wait" model services, > >> and repeated failures do not lead to a transition to mainte- > >> nance state. > >> > >> Given this statement I have taken out the check of the exit status and > >> just reset the start timers in the event of a wait style exit. Just as > >> a note this really isn't the case today, as shown by creating a service > >> that uses a duration value of child that exits ten times rapidly. > >> > >> new webrev is located at : > >> > >> http://cr.opensolaris.org/~swilcox/webrev.1/ > >> > >> Thanks, > >> > >> -- > >> Sean Wilcox > >> 303.272.9711 > >> x79711 > >> > >> _______________________________________________ > >> smf-discuss mailing list > >> smf-discuss at opensolaris.org > >> > > > > Sean, > > > > It looks good to me, but I've not spent a lot of time looking at restarter > > code. Thus, it would be good to get a second opinion. > > > > tom > > _______________________________________________ > > smf-discuss mailing list > > smf-discuss at opensolaris.org > > > > > > > I have reworked this fix now to take into account not putting hooks into > the graph code to tie it to the starter. And would like to request a > re-review of the new bits : > > http://cr.opensolaris.org/~swilcox/webrev2/ > > Thanks, > > -- > Sean Wilcox > > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org
Just one small nit. Other than that, it looks good to me. usr/src/cmd/svc/startd/restarter.c: line 1672 - Have you run lint on this? I was surprised not to see /* FALLTHROUGH */ here. Even if lint passes, this is a handy comment to let people know that the "missing" break is intentional. tom