Package ghidra.pty.windows

# Class ConPty

java.lang.Object
ghidra.pty.windows.ConPty

All Implemented Interfaces:
  `Pty`, `AutoCloseable`

public class ConPty extends Object implements Pty

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConPty(Pipe pipeToChild, Pipe pipeFromChild, PseudoConsoleHandle pseudoConsoleHandle)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes both ends of the pty
  `PtyChild`
  `getChild()`
  Get a handle to the child side of the pty
  `PtyParent`
  `getParent()`
  Get a handle to the parent side of the pty
  `static ConPty`
  `openpty(short cols, short rows)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ConPty

    public ConPty(Pipe pipeToChild, Pipe pipeFromChild, PseudoConsoleHandle pseudoConsoleHandle)

- ## Method Details

  - ### openpty

    public static ConPty openpty(short cols, short rows)

  - ### getParent

    public PtyParent getParent()
    Description copied from interface: `Pty`
    Get a handle to the parent side of the pty
    Specified by:
      `getParent` in interface `Pty`
    Returns:
      the parent handle

  - ### getChild

    public PtyChild getChild()
    Description copied from interface: `Pty`
    Get a handle to the child side of the pty
    Specified by:
      `getChild` in interface `Pty`
    Returns:
      the child handle

  - ### close

    public void close() throws IOException
    Description copied from interface: `Pty`
    Closes both ends of the pty

    This only closes this process's handles to the pty. For the parent end, this should be the only process with a handle. The child end may be opened by any number of other processes. More than likely, however, those processes will terminate once the parent end is closed, since reads or writes on the child will produce EOF or an error.

    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Pty`
    Throws:
      `IOException` - if an I/O error occurs