improved the pyshell

This commit is contained in:
roberto@debian32
2011-08-04 07:05:39 +02:00
parent 4f94ceed5e
commit 5353eba35b
6 changed files with 21 additions and 15 deletions
+2 -1
View File
@@ -1226,7 +1226,8 @@ void uwsgi_python_fixup() {
}
void uwsgi_python_hijack(void) {
if (up.pyshell) {
// the pyshell will be execute only in the first worker
if (up.pyshell && uwsgi.mywid == 1) {
PyImport_ImportModule("readline");
PyRun_InteractiveLoop(stdin, "uwsgi");
exit(0);