sys_signalfd4

Function sys_signalfd4 

Source
pub fn sys_signalfd4(
    locked: &mut Locked<Unlocked>,
    current_task: &CurrentTask,
    fd: FdNumber,
    mask_addr: UserRef<SigSet>,
    mask_size: usize,
    flags: u32,
) -> Result<FdNumber, Errno>
Expand description

The signalfd4 syscall creates a file descriptor that can be used to accept signals targeted at the caller.

§Args

  • fd: A file descriptor. If -1, a new file descriptor is created. Otherwise, the mask of the existing signalfd is modified.
  • mask_addr: A pointer to a signal set specifying the signals to handle with this signalfd.
  • mask_size: The size of the signal set, in bytes.
  • flags: Flags to control the behavior of the file descriptor.

§Returns

On success, returns Ok(FdNumber) containing the file descriptor number. On failure, returns an Errno.