summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2013-02-07 12:27:54 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:26:12 +1100
commit0a59a7dd7f5a89f3b72fe143ecf972df8eb24401 (patch)
tree12a8fa3fa68ad9abf17107172f4612690af6584d /include
parentdf5fe2e846c1d6e25443f43c59d9b939f8925e46 (diff)
signalfd: add ability to return siginfo in a raw format
signalfd should be called with the flag SFD_RAW for that. signalfd_siginfo is not full for siginfo with a negative si_code. copy_siginfo_to_user() is copied a full siginfo to user-space, if si_code is negative. signalfd_copyinfo() doesn't do that and can't be expanded, because it has not compatible format with siginfo_t. Another problem is that a constant __SI_* is removed from si_code. It's not a problem for usual applications, because they expect a defined type of siginfo (internal logic). When we want to dump pending signals, we can't predict a type of siginfo, so we should get it from kernel. The main idea of the raw format is that it should be enough for restoring exactly the same siginfo for the current process. This functionality is required for checkpointing pending signals. Signed-off-by: Andrey Vagin <avagin@openvz.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: David Howells <dhowells@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/signalfd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/signalfd.h b/include/uapi/linux/signalfd.h
index 492c6def340d..bc3184965b89 100644
--- a/include/uapi/linux/signalfd.h
+++ b/include/uapi/linux/signalfd.h
@@ -15,6 +15,7 @@
/* Flags for signalfd4. */
#define SFD_CLOEXEC O_CLOEXEC
#define SFD_NONBLOCK O_NONBLOCK
+#define SFD_RAW O_DIRECT
struct signalfd_siginfo {
__u32 ssi_signo;