Skip to content

Instantly share code, notes, and snippets.

@unbit
Created May 16, 2012 08:22
Show Gist options
  • Save unbit/2708669 to your computer and use it in GitHub Desktop.
Save unbit/2708669 to your computer and use it in GitHub Desktop.
diff -r c245ac034d7c plugins/python/python_plugin.c
--- a/plugins/python/python_plugin.c Tue May 15 08:59:08 2012 +0200
+++ b/plugins/python/python_plugin.c Wed May 16 10:21:54 2012 +0200
@@ -249,6 +249,8 @@
void uwsgi_python_atexit() {
+ if (uwsgi.mywid == -1) goto realstuff;
+
// if hijacked do not run atexit hooks
if (uwsgi.workers[uwsgi.mywid].hijacked)
return;
@@ -263,6 +265,8 @@
return;
#endif
+realstuff:
+
// this time we use this higher level function
// as this code can be executed in a signal handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment