try {
//log.debug(" --- Shell Impl --- readBuffer() entered.");
//used();
if (id.equals(STDIN_ID)) {
if (!interactive) {
throw new NoSuchProcessException("No process for STDIN. Session is not in interactive mode.");
}
// System.out.println("OH NO ! id = " + id);
LinkedList retobj = outreader.readBuffer(maxsize);
// System.out.println("<<<<<<<<");
p = (Process) procmap.get(id);
if (p != null) {
p.using();
}
return retobj;
}
p = (Process) procmap.get(id);
if (p == null) {
// let's find process data for id
HistoryItem ti = getHistoryItem(id);
throw new NoSuchProcessException("No process for id: " + id + " (" + (ti == null ? " No info available for process" : ti.toString()) + ")");
}
p.using();
// we need an input stream around outputbuffer
// we need to save it like together with the Process