int fd = getStdioFD(opts);
OutputStream out;
switch (fd) {
case 1:
log.debug("Using standard output for script output");
out = new NoCloseOutputStream(parent.runner.getStdout());
break;
case 2:
log.debug("Using standard error for script output");
out = new NoCloseOutputStream(parent.runner.getStderr());
break;
default:
throw new AssertionError("Child process only supported on fds 1 and 2");
}
switch (arg) {