fixed harakiri tracebacker

This commit is contained in:
Unbit
2014-01-12 10:25:32 +01:00
parent d4e9f3a2d4
commit d1285c6dc4
2 changed files with 7 additions and 10 deletions
+7 -9
View File
@@ -1802,15 +1802,13 @@ static void uwsgi_python_harakiri(int wid) {
if (fd < 1)
goto exit;
int ret = uwsgi_waitfd(fd, uwsgi.socket_timeout);
if (ret <= 0) {
goto cleanup;
}
ssize_t len = read(fd, buf, 8192);
if (len <= 0) {
goto cleanup;
}
uwsgi_log("%.*s", (int) len, buf);
for(;;) {
int ret = uwsgi_waitfd(fd, uwsgi.socket_timeout);
if (ret <= 0) goto cleanup;
ssize_t len = read(fd, buf, 8192);
if (len <= 0) goto cleanup;
uwsgi_log("%.*s", (int) len, buf);
}
cleanup:
close(fd);