### Constructor

# Foundry PtyDiagnostics new

#### Declaration [src]

    FoundryPtyDiagnostics*
    foundry_pty_diagnostics_new (
      FoundryContext* context,
      int pty_fd
    )

#### Description [src]

`pty_fd` should be a valid file-descriptor for the consumer side of the PTY device. This is sometimes, historically, called the “master” side of a PTY device.

`pty_fd` will be `dup()`d.

You can use `foundry_pty_diagnostics_get_fd()` to get a new synthetic PTY consumer for which you can create a producer for and attach to child processes.

The resulting `FoundryPtyDiagnostics` is also a `GListModel` of `FoundryDiagnostic` so you may use the list model API to access diagnostics as they are discovered.

#### Parameters

`context`

  Type: `FoundryContext`

  A `FoundryContext`.

  The data is owned by the caller of the function.

`pty_fd`

  Type: `int`

  A file-descriptor for PTY consumer.

#### Return value

Type: `FoundryPtyDiagnostics`

No description available.

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