if (cmdl.size() == joblist.size() + 1) {
if (cmdl.getSLStdOutRedir() != null) {
try {
OutputStreamBuffer bout = new OutputStreamBuffer(new FileOutputStream(cmdl.getSLStdOutRedir(), cmdl.getSLAppend()), cmdl.isSLOutObjMode());
bout.setProperties(env);
out = bout;
p.setRedirected(true);
} catch (IOException ex) {
throw new ShellException("Exception occured while initializing output buffer: " + ex.toString());
}
} else if (cmdl.getStdOutRedir() != null) {
try {
////out=new OutputStreamBuffer(new VFSOutputStream(new SecureVFS(vfs, uctx), cmdl.getStdOutRedir(), cmdl.getAppend()), cmdl.isOutObjMode());
//if(TxSupport.isActive()) throw new ShellException("Illegal state - inside transaction.");
//TxSupport.begin();
try {
FileName fname = new FileName(cmdl.getStdOutRedir());
if (fname.isRelative()) {
fname = new FileName(getEnvProperty("PWD")).absolutize(fname);
}
OutputStreamBuffer bout = new OutputStreamBuffer(new LazyVFSOutputStream(new SecureVFS(vfs, uctx), fname.toString(), cmdl.getAppend()), cmdl.isOutObjMode());
bout.setProperties(env);
out = bout;
p.setRedirected(true);
//TxSupport.commit();
} catch (Exception ex) {
//TxSupport.rollback();