Commit 546f2701 authored by Pavel Emelyanov's avatar Pavel Emelyanov

signals: Comments and while (1) loop

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 11fc4758
......@@ -1179,7 +1179,7 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
signal_queue_entry__init(queue);
for (; ; ) {
while (1) {
int nr, si_pos;
siginfo_t *si;
......@@ -1191,7 +1191,7 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
nr = ret = ptrace(PTRACE_PEEKSIGINFO, tid, &arg, si);
if (ret == 0)
break;
break; /* Finished */
if (ret < 0) {
if (errno == EIO) {
......@@ -1199,6 +1199,7 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
ret = 0;
} else
pr_perror("ptrace");
break;
}
......@@ -1234,7 +1235,6 @@ static int dump_signal_queue(pid_t tid, SignalQueueEntry **sqe, bool group)
}
*sqe = queue;
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment