fix threading bug in pyshell

This commit is contained in:
roberto@debian32
2011-08-16 07:31:20 +02:00
parent c9e759bc14
commit 6f5b468b11
3 changed files with 5 additions and 1 deletions
+2
View File
@@ -1317,6 +1317,8 @@ void uwsgi_python_fixup() {
void uwsgi_python_hijack(void) {
// the pyshell will be execute only in the first worker
UWSGI_GET_GIL;
if (up.pyshell && uwsgi.mywid == 1) {
PyImport_ImportModule("readline");
PyRun_InteractiveLoop(stdin, "uwsgi");