Quesiton on samba_init_module
Stefan (metze) Metzmacher
metze at samba.org
Mon Nov 11 04:17:17 MST 2013
Am 11.11.2013 12:11, schrieb Jelmer Vernooij:
> On Mon, Nov 11, 2013 at 02:56:46AM -0800, sandeep nag wrote:
>> I see a initialization function for samba module(init_samba_module), but
>> not a exit function. I am opening a file in init function, where should I
>> close it. Just worrying on, If I do not close it, It may lead to some
> There is no exit function per se, as modules are not unloaded. On some platforms,
> you can use a DT_FINI function.
> If you'd like to have a function run before Samba exits, you could possibly also use
> the standard atexit() function.
In some places we use _exit() which will bypass the atexit() hooks.
More information about the samba-technical