Function signalfd [src]
Prototype
pub fn signalfd(fd: fd_t, mask: *const sigset_t, flags: u32) !fd_t
Parameters
fd: fd_t
mask: *const sigset_t
flags: u32
Source
pub fn signalfd(fd: fd_t, mask: *const sigset_t, flags: u32) !fd_t {
const rc = system.signalfd(fd, mask, flags);
switch (errno(rc)) {
.SUCCESS => return @intCast(rc),
.BADF, .INVAL => unreachable,
.NFILE => return error.SystemFdQuotaExceeded,
.NOMEM => return error.SystemResources,
.MFILE => return error.ProcessResources,
.NODEV => return error.InodeMountFail,
else => |err| return unexpectedErrno(err),
}
}