From b6078b77f40a4f6c56093041e9d54b89455013ae Mon Sep 17 00:00:00 2001 From: Artem Khvastunov Date: Fri, 8 Jan 2021 15:16:27 +0100 Subject: [PATCH] GO-10265 ensure EOF sent after copying stream from input file GitOrigin-RevId: ea80f6a24390d7027864f248019f55a4d80893af --- .../com/intellij/execution/process/OSProcessHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/platform-util-io/src/com/intellij/execution/process/OSProcessHandler.java b/platform/platform-util-io/src/com/intellij/execution/process/OSProcessHandler.java index a7981aa0fd60..01bf4041def5 100644 --- a/platform/platform-util-io/src/com/intellij/execution/process/OSProcessHandler.java +++ b/platform/platform-util-io/src/com/intellij/execution/process/OSProcessHandler.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.process; import com.intellij.diagnostic.LoadingState; @@ -27,10 +27,8 @@ import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.InputStream; import java.nio.charset.Charset; -import java.util.Collections; import java.util.HashSet; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; public class OSProcessHandler extends BaseOSProcessHandler { private static final Logger LOG = Logger.getInstance(OSProcessHandler.class); @@ -270,6 +268,10 @@ public class OSProcessHandler extends BaseOSProcessHandler { } } + public boolean hasPty() { + return myHasPty; + } + /** *

In case of PTY this process handler will use blocking read because {@link InputStream#available()} doesn't work for Pty4j, and there * is no reason to "disconnect" leaving PTY alive. See {@link BaseDataReader.SleepingPolicy} for more info.