From d7e8523fcf2cb393d3365addbce2308b7ad46554 Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Sat, 10 Mar 2012 12:06:19 +0100 Subject: [PATCH] do not call atexit hooks in async mode --- plugins/python/python_plugin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index abb22264..a90db4c7 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -240,6 +240,12 @@ void uwsgi_python_atexit() { if (uwsgi.workers[uwsgi.mywid].busy) return; +#ifdef UWSGI_ASYNC + // managing atexit in async mode is a real pain...skip it for now + if (uwsgi.async > 1) + return; +#endif + // this time we use this higher level function // as this code can be executed in a signal handler