mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-03 23:48:22 +00:00
fixed harakiri tracebacker
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -114,7 +114,6 @@ void *uwsgi_python_tracebacker_thread(void *foobar) {
|
||||
}
|
||||
PyObject *frame = PyIter_Next(frames_iter);
|
||||
while(frame) {
|
||||
|
||||
PyObject *thread_id = PyTuple_GetItem(frame, 0);
|
||||
if (!thread_id) goto next2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user