From: Andrey Vagin <avagin@openvz.org>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-man@vger.kernel.org, linux-kernel@vger.kernel.org,
criu@openvz.org, Andrey Vagin <avagin@openvz.org>
Subject: [PATCH 2/3] ptrace.2: add description for PTRACE_PEEKSIGINFO
Date: Tue, 16 Jul 2013 12:19:32 +0400 [thread overview]
Message-ID: <1373962773-2041-3-git-send-email-avagin@openvz.org> (raw)
In-Reply-To: <1373962773-2041-1-git-send-email-avagin@openvz.org>
Retrieve signals without removing them from a queue.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
man2/ptrace.2 | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/man2/ptrace.2 b/man2/ptrace.2
index 5fcac2b..e74535e 100644
--- a/man2/ptrace.2
+++ b/man2/ptrace.2
@@ -317,6 +317,45 @@ itself.
.RI ( addr
is ignored.)
.TP
+.BR PTRACE_PEEKSIGINFO " (since Linux 3.10)"
+.\" commit 84c751bd4aebbaae995fe32279d3dba48327bad4
+Retrieve
+.I siginfo_t
+structures without removing signals from a queue.
+.I addr
+points to a
+.I ptrace_peeksiginfo_args
+structure.
+.I siginfo_t
+structures are copied into the buffer starting at
+.I data.
+The return value contains a number of copied signals (zero indicates
+that a signal with this sequence number doesn't exist).
+A result
+.I siginfo
+contains a kernel part of
+.IR si_code
+(
+.BR __SI_CHLD,
+.BR __SI_FAULT,
+etc), which is not shown in other places.
+.PP
+.in +10n
+.nf
+struct ptrace_peeksiginfo_args {
+ u64 off; /* from which siginfo to start */
+ u32 flags;
+ s32 nr; /* how may siginfos to take */
+};
+.fi
+
+Currently here is only one flag
+.BR PTRACE_PEEKSIGINFO_SHARED
+for dumping signals from process-wide queue.
+If this flag is not set, signals are read from a per-thread queue.
+.in
+.PP
+.TP
.BR PTRACE_SETOPTIONS " (since Linux 2.4.6; see BUGS for caveats)"
Set ptrace options from
.IR data .
--
1.8.3.1
next prev parent reply other threads:[~2013-07-16 8:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 8:19 [PATCH 0/3] ptrace.2: explain new commands to work with signals Andrey Vagin
2013-07-16 8:19 ` [PATCH 1/3] ptrace.2: place GETSIGINFO and SETSIGINFO near each other Andrey Vagin
2013-07-18 1:13 ` Michael Kerrisk
2013-08-08 14:43 ` Andrew Vagin
2013-07-16 8:19 ` Andrey Vagin [this message]
2014-01-20 10:02 ` [PATCH 2/3] ptrace.2: add description for PTRACE_PEEKSIGINFO Michael Kerrisk (man-pages)
2013-07-16 8:19 ` [PATCH 3/3] ptrace.2: add description for PTRACE_{GET,SET}SIGMASK Andrey Vagin
2014-01-20 10:03 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373962773-2041-3-git-send-email-avagin@openvz.org \
--to=avagin@openvz.org \
--cc=criu@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®