From f0476e816950928246ee11d873fb13a86c691fb6 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 23 Feb 2008 17:42:31 +0000 Subject: [PATCH] Patch #1957: syslogmodule: Release GIL when calling syslog(3) --- Misc/NEWS | 2 ++ Modules/syslogmodule.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index e1fc418afbe..7c81958a2e6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1193,6 +1193,8 @@ Library Extension Modules ----------------- +- Patch #1957: syslogmodule: Release GIL when calling syslog(3) + - #2112: mmap.error is now a subclass of EnvironmentError and not a direct EnvironmentError diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 4a77916942b..9e1ed0619f1 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -92,7 +92,9 @@ syslog_syslog(PyObject * self, PyObject * args) return NULL; } + Py_BEGIN_ALLOW_THREADS; syslog(priority, "%s", message); + Py_END_ALLOW_THREADS; Py_INCREF(Py_None); return Py_None; }