[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130227183850.GA6042@redhat.com>
Date: Wed, 27 Feb 2013 19:38:50 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrey Vagin <avagin@...nvz.org>
Cc: linux-kernel@...r.kernel.org, criu@...nvz.org,
linux-api@...r.kernel.org, Roland McGrath <roland@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
David Howells <dhowells@...hat.com>,
Dave Jones <davej@...hat.com>,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
Pavel Emelyanov <xemul@...allels.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pedro Alves <palves@...hat.com>
Subject: Re: [PATCH 1/2] ptrace: add ability to retrieve signals without
removing from a queue (v3)
On 02/27, Andrey Vagin wrote:
>
> +struct ptrace_peeksiginfo_args {
> + __u64 off; /* from which siginfo to start */
Cough... You are optimist. You want to handle the case when the
tracee has 1 << 33 or more pending sigqueues. OK good luck ;)
Looks correct, just one nit.
> + for (i = 0; i < arg.nr; i++) {
> ...
> + data += sizeof(siginfo_t);
> +
> + if (signal_pending(current)) {
> + i++; /* accounting the current siginfo */
> + break;
> + }
Imho, this is confusing. Just do
for (i = 0; i < arg.nr; ) {
...
data += sizeof(siginfo_t);
i++;
if (signal_pending(current))
break;
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists