### Method

# Foundry UnixFDMap create_stream

#### Declaration [src]

    GIOStream*
    foundry_unix_fd_map_create_stream (
      FoundryUnixFDMap* self,
      int dest_read_fd,
      int dest_write_fd,
      GError** error
    )

#### Description [src]

Creates a `GIOStream` to communicate with another process.

Use this to create a `GIOStream` to use from the calling process to communicate with a subprocess. Generally, you should pass STDIN_FILENO for `dest_read_fd` and STDOUT_FILENO for `dest_write_fd`.

#### Parameters

`dest_read_fd`

  Type: `int`

  The FD number in the destination process for the read side (stdin).

`dest_write_fd`

  Type: `int`

  The FD number in the destination process for the write side (stdout).

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GIOStream`

A `GIOStream` if successful; otherwise `NULL` and `error` is set.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.