Driver init failure not detected
Jakob Cederlund på UAB
jakob@REDACTED
Tue Oct 30 10:21:28 CET 2001
At 22:27 2001-10-29 +0100, you wrote:
>The init function of struct driver_entry is not used for dynamic
>drivers. See erl_ddll(3) for the details.
>
>/Peter
This is almost right, and the driver_entry.html is wrong (it's fixed now).
There are pecularities in erl_ddll.html though, the handle is not used, and
you don't need a null_func, NULL is fine to put in the driver_entry (from
R8), etc. This will also be fixed.
The truth is that init is indeed called when a dynamic driver is loaded (it
is done so in the add_driver_entry function in the emulator). But the
return code from init is ignored. My feeling about this is that this is
wrong, and that the return code should be checked, and the emulator (or
erl_ddll) should unload the driver if init returns -1. But for now it
doesn't. You'll have to set some error variable and check this later on.
/Jakob
More information about the erlang-questions
mailing list