Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2013-10-14 05:03:36 -0400
committerAnton Leherbauer2013-10-14 05:15:09 -0400
commitf46724244cd1d6eb5dee2709e633d8011ec2dd71 (patch)
treee7f2e3a910474c82dc214277fad8c82b105e4303
parent1996718ce681912fcc8a1bb6dfd19a8b10f6271d (diff)
downloadorg.eclipse.cdt-f46724244cd1d6eb5dee2709e633d8011ec2dd71.tar.gz
org.eclipse.cdt-f46724244cd1d6eb5dee2709e633d8011ec2dd71.tar.xz
org.eclipse.cdt-f46724244cd1d6eb5dee2709e633d8011ec2dd71.zip
Bug 418797 - Spawner closes file descriptor it didn't open when process cannot be started
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java
index e5c1cea5aa..ad07b7ead4 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2013 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -61,7 +61,7 @@ public class Spawner extends Process {
int pid = 0;
int status;
- final int[] fChannels = new int[3];
+ final int[] fChannels = { -1, -1, -1 };
boolean isDone;
OutputStream out;
InputStream in;
@@ -400,9 +400,6 @@ public class Spawner extends Process {
if (pid == -1) {
throw new IOException("Exec error"); //$NON-NLS-1$
}
- fChannels[0] = -1;
- fChannels[1] = -1;
- fChannels[2] = -1;
}
/**

Back to the top