My linked-in driver gets unloaded after a crash

zabrane Mikael <>
Mon Aug 2 11:45:12 CEST 2010

Hi guys,

I've implemented a toy linked-in driver called "foo_drv". Everything works
fine as soon as there's
no error in the driver side nor Erlang side.
But when a crash happens, its gets unloaded by the VM.

$ erl
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:128]

Eshell V5.7.5  (abort with ^G)
1> foo_drv:start().
driver successfully loaded

2> erl_ddll:loaded_drivers().
     "ram_file_drv","tty_sl", "foo_drv"]}

3> 1 / a. %% simulate a crash
** exception error: bad argument in an arithmetic expression
     in operator  '/'/2
        called as 1 / a

4> erl_ddll:loaded_drivers().

5> q().

Could someone tell me why my driver gets unloaded after any crash while
other drivers (eg. efile, zlib_drv ...) are still loaded?


More information about the erlang-questions mailing list