Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105423
b: refs/heads/master
c: 5fb5e04
h: refs/heads/master
i:
  105421: d6bf059
  105419: bd6cd19
  105415: 7b35926
  105407: e11b404
v: v3
  • Loading branch information
Ulrich Drepper authored and Linus Torvalds committed Jul 24, 2008
1 parent 3dcffd2 commit 0e3e7b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77d2720059618b9b6e827a8b73831eb6c6fad63c
refs/heads/master: 5fb5e04926a54bc1c22bba7ca166840f4476196f
4 changes: 2 additions & 2 deletions trunk/fs/signalfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask,
sigset_t sigmask;
struct signalfd_ctx *ctx;

if (flags & ~SFD_CLOEXEC)
if (flags & ~(SFD_CLOEXEC | SFD_NONBLOCK))
return -EINVAL;

if (sizemask != sizeof(sigset_t) ||
Expand All @@ -232,7 +232,7 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask,
* anon_inode_getfd() will install the fd.
*/
ufd = anon_inode_getfd("[signalfd]", &signalfd_fops, ctx,
flags & O_CLOEXEC);
flags & (O_CLOEXEC | O_NONBLOCK));
if (ufd < 0)
kfree(ctx);
} else {
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/signalfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
#ifndef _LINUX_SIGNALFD_H
#define _LINUX_SIGNALFD_H

/* For O_CLOEXEC */
/* For O_CLOEXEC and O_NONBLOCK */
#include <linux/fcntl.h>

/* Flags for signalfd4. */
#define SFD_CLOEXEC O_CLOEXEC
#define SFD_NONBLOCK O_NONBLOCK

struct signalfd_siginfo {
__u32 ssi_signo;
Expand Down

0 comments on commit 0e3e7b4

Please sign in to comment.