Skip to main content

splinter_event_bus_open

Function splinter_event_bus_open 

Source
pub unsafe extern "C" fn splinter_event_bus_open() -> c_int
Expand description

@brief Open a process-local read fd to the owner’s eventfd.

Reads owner_pid and owner_fd from the shared header and opens /proc/<owner_pid>/fd/<owner_fd> to obtain a local file descriptor pointing to the same kernel eventfd object. Works both in the owner process and in any other process that has the store mapped.

@return A valid fd on success (caller must pass it to splinter_event_bus_close), or -1 on failure (errno set).