]> granicus.if.org Git - python/commitdiff
Patch #1957: syslogmodule: Release GIL when calling syslog(3)
authorChristian Heimes <christian@cheimes.de>
Sat, 23 Feb 2008 17:42:31 +0000 (17:42 +0000)
committerChristian Heimes <christian@cheimes.de>
Sat, 23 Feb 2008 17:42:31 +0000 (17:42 +0000)
Misc/NEWS
Modules/syslogmodule.c

index e1fc418afbe7ad673634096bf1889c70853ee74f..7c81958a2e64648ad01e8598d0a5b8e876105d35 100644 (file)
--- 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
 
index 4a77916942ba40e98013f94685c5cc3922cb1dab..9e1ed0619f1ff7b3fd55c2ce04b937bc12a6d528 100644 (file)
@@ -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;
 }