News for hackers. Stuff that matters.
Re:Don't setenv in multi-threaded code on glibc by quotemstr on Tuesday January 31, 2017 @05:23PM (#13535889)
Your example doesn't result in a deadlock or undefined behavior though. It just results in some at-exit code not being run.

Really, programs shouldn't expect _anything_ to happen on exit. After all, programs can die at any time for any reason anyway. Personally, I'd do away with both atexit and static destructors. Your program needs to be able to handle the power cord being yanked, so it needs to be able to handle sudden death no matter what.

There are no comments on this comment yet.