2001-11-12
2001-11-12 15:59:11 by Martin Stjernholm <mast@lysator.liu.se>
-
58580c5c95d22f1ed7f5a535d79d180654e61d67
(10 lines)
(+9/-1)
[
Show
| Annotate
]
Branch: 7.9
Fixed a minor leak when pthread_atfork doesn't exist.
Rev: src/threads.c:1.175
1:
#include "global.h"
- RCSID("$Id: threads.c,v 1.174 2001/11/09 02:09:14 nilsson Exp $");
+ RCSID("$Id: threads.c,v 1.175 2001/11/12 15:59:11 mast Exp $");
PMOD_EXPORT int num_threads = 1;
PMOD_EXPORT int threads_disabled = 0;
34: Inside #if !defined(HAVE_PTHREAD_ATFORK) && !defined(th_atfork)
#if !defined(HAVE_PTHREAD_ATFORK) && !defined(th_atfork)
#include "callback.h"
+ #define PIKE_USE_OWN_ATFORK
static struct callback_list atfork_prepare_callback;
1928:
free_program(thread_id_prog);
thread_id_prog=0;
}
+
+ #ifdef PIKE_USE_OWN_ATFORK
+ free_callback_list(&atfork_prepare_callback);
+ free_callback_list(&atfork_parent_callback);
+ free_callback_list(&atfork_child_callback);
+ #endif
}
#endif