### Function

# Ide PtyIntercept create_slave

#### Declaration

    IdePtyFd
    ide_pty_intercept_create_slave (
      IdePtyFd master_fd,
      gboolean blocking
    )

#### Description

This creates a new slave to the PTY master `master_fd`.

This uses grantpt(), unlockpt(), and `ptsname()` to open a new PTY slave.

Available since: | 3.32

#### Parameters

`master_fd` | `IdePtyFd`
| A pty master.
`blocking` | `gboolean`
| Use `FALSE` to set O_NONBLOCK.

#### Return value

Returns: | `IdePtyFd`
| A FD for the slave PTY that should be closed with close(). Upon error, `IDE_PTY_FD_INVALID` (-1) is returned.