James Carlson wrote: > >> Right. Sorry - I should have expanded on this a bit more. >> I first took a look at what it would take to get dhcpagent >> in a separate contract. The ideal scenario would be a >> service conversion of course, but slightly less work >> in the interim would have been to ctrun /sbin/dhcpagent >> when it is invoked by libdhcpagent. Problem with this is >> that ctrun is in /usr/bin, so not guaranteed to be available >> early in boot >> > > Putting it in a separate contract is the right idea. "ctrun," though, > isn't the solution. Using the contract(4) interfaces solves the > problem. > > I can probably provide a fix if you need it. It's been a minor issue > for things other than NWAM, but it's clearly more of a problem now. > > That would be great, but I wouldn't want you to spend too long on this. I think I can probably put something together, but I'd really appreciate code review help once I'm done.
I think we'll also still need the contract kill for stray ENM execution scripts. > (For what it's worth, I'm still confused by the "-9" -- SIGKILL -- > used in the current nwamd. I don't see how that's the right answer. > I would have thought SIGTERM [the default -- -15] would have been > sufficient. -9 is far too violent for my taste.) > > Agreed. >> One thing that occurred to me later - that SIGTERM will >> also hit the daemon itself and the stop script (since these >> are also part of the contract). >> > > The usual solution to that is to block SIGTERM in the function that > broadcasts the SIGTERM from the main daemon. > > Sounds good. Thanks! Alan
