1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Initialize file descriptors with -1 in case of exec_detached, related to 345164

This commit is contained in:
Anton Leherbauer 2011-05-11 12:12:30 +00:00
parent 19370c7dcf
commit fe42af7abe

View file

@ -61,7 +61,7 @@ public class Spawner extends Process {
int pid = 0; int pid = 0;
int status; int status;
int[] fChannels = new int[3]; final int[] fChannels = new int[3];
boolean isDone; boolean isDone;
OutputStream out; OutputStream out;
InputStream in; InputStream in;
@ -400,6 +400,9 @@ public class Spawner extends Process {
if (pid == -1) { if (pid == -1) {
throw new IOException("Exec error"); //$NON-NLS-1$ throw new IOException("Exec error"); //$NON-NLS-1$
} }
fChannels[0] = -1;
fChannels[1] = -1;
fChannels[2] = -1;
} }
/** /**