mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert "CPP-6254 Output for CLion IDE sometimes cuts off when executing a program"
This reverts commit 92e527b1a9.
This commit is contained in:
@@ -139,8 +139,8 @@ public class BaseOSProcessHandler extends ProcessHandler implements TaskExecutor
|
||||
public void consume(Integer exitCode) {
|
||||
try {
|
||||
// tell readers that no more attempts to read process' output should be made
|
||||
stop(stdErrReader);
|
||||
stop(stdOutReader);
|
||||
if (stdErrReader != null) stdErrReader.stop();
|
||||
stdOutReader.stop();
|
||||
|
||||
try {
|
||||
if (stdErrReader != null) stdErrReader.waitFor();
|
||||
@@ -163,17 +163,6 @@ public class BaseOSProcessHandler extends ProcessHandler implements TaskExecutor
|
||||
super.startNotify();
|
||||
}
|
||||
|
||||
private static void stop(@Nullable BaseDataReader reader) {
|
||||
if (reader != null) {
|
||||
if (reader instanceof BaseOutputReader) {
|
||||
((BaseOutputReader)reader).stop(false);
|
||||
}
|
||||
else {
|
||||
reader.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated override {@link #createOutputDataReader()} (to be removed in IDEA 18) */
|
||||
protected BaseDataReader createErrorDataReader(@SuppressWarnings("UnusedParameters") BaseDataReader.SleepingPolicy policy) {
|
||||
return createErrorDataReader();
|
||||
|
||||
@@ -190,12 +190,8 @@ public abstract class BaseOutputReader extends BaseDataReader {
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
stop(true);
|
||||
}
|
||||
|
||||
public void stop(boolean force) {
|
||||
super.stop();
|
||||
if (force && mySleepingPolicy == SleepingPolicy.BLOCKING) {
|
||||
if (mySleepingPolicy == SleepingPolicy.BLOCKING) {
|
||||
// we can't count on super.stop() since it only sets 'isRunning = false', and blocked Reader.read won't wake up.
|
||||
try { close(); }
|
||||
catch (IOException ignore) { }
|
||||
|
||||
Reference in New Issue
Block a user