Method

IdeRunnertake_fd

Declaration

gint
ide_runner_take_fd (
  IdeRunner* self,
  gint source_fd,
  gint dest_fd
)

Description

This will ensure that source_fd is mapped into the new process as dest_fd. If dest_fd is -1, then the next fd will be used and that value will be returned. Note that this is not a valid fd in the calling process, only within the destination process.

Available since:3.32

Parameters

source_fd gint
 

The fd to map, this will be closed by IdeRunner.

dest_fd gint
 

The target FD in the spawned process, or -1 for next available.

Return value

Returns: int
 

dest_fd or the FD or the next available dest_fd.