aboutsummaryrefslogtreecommitdiffstats
path: root/fs/signalfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/signalfd.c')
-rw-r--r--fs/signalfd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 8bee4e570911..b53486961735 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -29,6 +29,7 @@
29#include <linux/anon_inodes.h> 29#include <linux/anon_inodes.h>
30#include <linux/signalfd.h> 30#include <linux/signalfd.h>
31#include <linux/syscalls.h> 31#include <linux/syscalls.h>
32#include <linux/proc_fs.h>
32 33
33void signalfd_cleanup(struct sighand_struct *sighand) 34void signalfd_cleanup(struct sighand_struct *sighand)
34{ 35{
@@ -227,7 +228,24 @@ static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count,
227 return total ? total: ret; 228 return total ? total: ret;
228} 229}
229 230
231#ifdef CONFIG_PROC_FS
232static int signalfd_show_fdinfo(struct seq_file *m, struct file *f)
233{
234 struct signalfd_ctx *ctx = f->private_data;
235 sigset_t sigmask;
236
237 sigmask = ctx->sigmask;
238 signotset(&sigmask);
239 render_sigset_t(m, "sigmask:\t", &sigmask);
240
241 return 0;
242}
243#endif
244
230static const struct file_operations signalfd_fops = { 245static const struct file_operations signalfd_fops = {
246#ifdef CONFIG_PROC_FS
247 .show_fdinfo = signalfd_show_fdinfo,
248#endif
231 .release = signalfd_release, 249 .release = signalfd_release,
232 .poll = signalfd_poll, 250 .poll = signalfd_poll,
233 .read = signalfd_read, 251 .read = signalfd_read,