public WinConPtyProcess()

in src/com/pty4j/windows/conpty/WinConPtyProcess.java [43:60]


  public WinConPtyProcess(@NotNull PtyProcessOptions options, @Nullable LongConsumer winSuspendedProcessCallback) throws IOException {
    myCommand = options.getCommandWrapper();
    myIsBundledConPtyLibrary = ConPtyLibrary.isBundled();
    Pipe inPipe = new Pipe();
    Pipe outPipe = new Pipe();
    pseudoConsole = new PseudoConsole(getInitialSize(options), inPipe.getReadPipe(), outPipe.getWritePipe());
    processInformation = ProcessUtils.startProcess(pseudoConsole, myCommand, options.getDirectory(),
                                                   options.getEnvironment(), winSuspendedProcessCallback);
    if (!Kernel32.INSTANCE.CloseHandle(inPipe.getReadPipe())) {
      throw new LastErrorExceptionEx("CloseHandle stdin after process creation");
    }
    if (!Kernel32.INSTANCE.CloseHandle(outPipe.getWritePipe())) {
      throw new LastErrorExceptionEx("CloseHandle stdout after process creation");
    }
    myInputStream = new WinHandleInputStream(outPipe.getReadPipe());
    myOutputStream = new WinHandleOutputStream(inPipe.getWritePipe());
    startAwaitingThread(options.getCommandWrapper());
  }