From fe42af7abe87f78002a32fb77da09b7aaab4aad3 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Wed, 11 May 2011 12:12:30 +0000 Subject: [PATCH] Initialize file descriptors with -1 in case of exec_detached, related to 345164 --- .../utils/org/eclipse/cdt/utils/spawner/Spawner.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 310a38b1b71..e5c1cea5aa6 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 @@ -61,7 +61,7 @@ public class Spawner extends Process { int pid = 0; int status; - int[] fChannels = new int[3]; + final int[] fChannels = new int[3]; boolean isDone; OutputStream out; InputStream in; @@ -400,6 +400,9 @@ 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; } /**