[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

ruby 1.9.3 and at_exit()



A cautionary note for developers:

A known issue resurfaced in ruby 1.9.3[^1]; this defect causes problems with exception handling within a Kernel#at_exit() block. Specifically, your program's exit code may be reset to '0' if one of your registered at_exit() blocks includes some form of exception handling. This issue led to a bug in the OpenShift test suites[^2] which has been addressed by avoiding this error condition.

The core problem also seems to be resolved now, but please keep this mind if you plan to use Kernel#at_exit() in your own work. Hopefully this may save you some time and head-scratching :-)

Cheers,
Harrison

[^1]: https://bugs.ruby-lang.org/issues/5218

[^2]: https://bugzilla.redhat.com/show_bug.cgi?id=918339



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]