RFC: autostart mongo patch

Pete Zaitcev zaitcev at redhat.com
Tue Oct 12 15:22:15 UTC 2010


On Tue, 12 Oct 2010 08:32:19 -0400
Jeff Darcy <jdarcy at redhat.com> wrote:

> It doesn't have to be absolutely air-tight; that's why I said
> "reasonable efforts" before.  That probably does mean, though, that we
> should add an atexit(3) to cover cases like error(EXIT_FAILURE).

I was afraid you'd bring up atexit(). It is more reliable against
future inattentive modifications, but it looks to me like it
invites a slippery slope for hooks after hooks. There's one other
thing, too: I examined where we exited, including error(), and the
number of sites weren't great. In fact all of exiting error() were
either after an execvp() or usage(). This got me thinking... what
would happen if one of those were trying to kill something through
an atexit() hook? Then I quickly stopped thinking and added explicit
calls.

-- Pete


More information about the iwhd-devel mailing list