From 0bdaeb12a0c49c104eddcd8e47f351924bb4d8f1 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Thu, 15 Jul 2010 15:38:23 -0300 Subject: [PATCH] Clear exit_functions after the exit functions have been called While execve() does not run the functions registered with atexit() and they must therefore be called explicitly prior to the call to execve(), the Windows replacement function will end up running the atexit() hooks twice, and clearing the pointer prevents the functions from actually running twice. --- exitfn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exitfn.c b/exitfn.c index 0a8179322..6def242de 100644 --- a/exitfn.c +++ b/exitfn.c @@ -93,4 +93,5 @@ exitfn_call(void) p = p->next; free(q); } + exit_functions = NULL; } -- 2.47.3