Don't exit(0) from main(), return 0 instead, to make sure that stack
unwinding happens properly during normal usage.