Function

IdePtyInterceptcreate_producer

Declaration

IdePtyFd
ide_pty_intercept_create_producer (
  IdePtyFd consumer_fd,
  gboolean blocking
)

Description

This creates a new producer to the PTY consumer consumer_fd.

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

Parameters

consumer_fd

Type: IdePtyFd

A pty.

blocking

Type: gboolean

Use FALSE to set O_NONBLOCK.

Return value

Type: IdePtyFd

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