Skip to main content

addfd

Function addfd 

Source
pub fn addfd(listener: i32, id: u64, fd: i32, cloexec: bool) -> Result<i32, i32>
Expand description

Installs fd into the tracee at the lowest free descriptor number, without answering the notification. Closes the supervisor’s copy.

§Arguments

  • listener - Listener descriptor.
  • id - Notification id.
  • fd - Supervisor-side descriptor to hand over.
  • cloexec - Set O_CLOEXEC on the tracee’s copy.

§Returns

The descriptor number in the tracee.

§Errors

Errno from the ioctl.