Function

IdePtyInterceptcreate_slave

since: 3.32

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

Type: IdePtyFd

A pty master.

blocking

Type: gboolean

Use FALSE to set O_NONBLOCK.

Return value

Type: IdePtyFd

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