aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/code_SUITE_data/on_load_app-1.0/src/on_load_embedded.erl
AgeCommit message (Collapse)Author
2010-12-01Mend on_load_embedded testcase which did not handle windows linksPatrik Nyblom
2010-10-20Fix hang in on_load handlers in embedded modeBjörn Gustavsson
In embedded mode, all on_load handlers will be called after loading all modules but before starting any servers. Therefore, if an on_load handler calls any function in the code module that calls the code server (such as code:priv_dir/1), there will be a deadlock because the code server has not yet been started. Fix this problem by invoking the on_load handlers after having started most servers in the kernel application.
2009-12-13Change the expected return value for on_load functionsBjörn Gustavsson
An on_load function is supposed to return 'true' to indicate that the module should be loaded, and 'false' if it should be unloaded. But returning any other term, as well as causing an exception, will also unload the module. Since we don't like boolean values mixed with other values, change the expected return value as follows: * If 'ok' is returned, the module will remain loaded and become callable. * If any other value is returned (or an exception is generated), the module will be unloaded. Also, if the returned value is not an atom, send a warning message to the error_logger (using error_logger:warning_msg/2). The new interpretation of the return value means that an on_load function can now directly return the return value from erlang:load_nif/2.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP