[erlang-questions] reloading a NIF library without restarting the server

Sverker Eriksson <>
Mon Oct 19 14:02:00 CEST 2015


You can upgrade a NIF library in the same way
you upgrade an Erlang module. The upgraded Erlang code
just have to call erlang:load_nif/2 for the NIF library that it
wants to use.

However, you may need to place the new NIF library in a different
path or give it a different file name, otherwise the OS (dlopen)
may think you are loading the same library again.

/Sverker, Erlang/OTP Ericsson


On 10/19/2015 10:05 AM, Caragea Silviu wrote:
> Hello,
>
> It is possible to reload a nif library ?
>
> For example I have an app using NIF and after I'm doing some changes 
> over the native code I want to reload the new library in production 
> without restarting the server..
>
> I succeeded to reload the erlang code but seems it's still using the 
> oldest NIF.
>
> Silviu
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151019/8415108d/attachment.html>


More information about the erlang-questions mailing list