String[] join = new String[cmd.length + n];
System.arraycopy(cmd, 0, join, 0, cmd.length);
System.arraycopy(files, 0, join, cmd.length, n);
Process p = buildProcess(join, new File(bindebugPath));
OutputBuffer stdout = new OutputBuffer(p);
ErrorBuffer stderr = new ErrorBuffer(p);
ExitBuffer exitcode = new ExitBuffer(p);
stdout.waitFor();
stderr.waitFor();
exitcode.waitFor();
if (exitcode.getExitValue().intValue() != 0) {
System.out.write(stderr.getStderr());
System.out.write(stdout.getStdout());
System.out.flush();
return exitcode.getExitValue().intValue();
}
} catch (IOException ioe) {
ioe.printStackTrace();