Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 252060 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java (-5 / +13 lines)
Lines 11-16 Link Here
11
 * Martin Oberhuber (Wind River) - moved from org.eclipse.rse.remotecdt (bug 161777)
11
 * Martin Oberhuber (Wind River) - moved from org.eclipse.rse.remotecdt (bug 161777)
12
 * Martin Oberhuber (Wind River) - renamed from HostShellAdapter (bug 161777)
12
 * Martin Oberhuber (Wind River) - renamed from HostShellAdapter (bug 161777)
13
 * Martin Oberhuber (Wind River) - improved Javadoc
13
 * Martin Oberhuber (Wind River) - improved Javadoc
14
 * Greg Watson (IBM) - patch for bug #252060
14
 *******************************************************************************/
15
 *******************************************************************************/
15
16
16
package org.eclipse.rse.services.shells;
17
package org.eclipse.rse.services.shells;
Lines 154-166 Link Here
154
	 */
155
	 */
155
	public void shellOutputChanged(IHostShellChangeEvent event) {
156
	public void shellOutputChanged(IHostShellChangeEvent event) {
156
		IHostOutput[] input = event.getLines();
157
		IHostOutput[] input = event.getLines();
158
		if (input.length == 0) {
159
			try {
160
				outputStream.close();
161
			} catch (IOException e) {
162
			}
163
			return;
164
		}
157
		OutputStream outputStream = event.isError() ? hostShellError : hostShellInput;
165
		OutputStream outputStream = event.isError() ? hostShellError : hostShellInput;
158
		try {
166
		try {
159
		for(int i = 0; i < input.length; i++) {
167
			for(int i = 0; i < input.length; i++) {
160
			outputStream.write(input[i].getString().getBytes());
168
				outputStream.write(input[i].getString().getBytes());
161
			outputStream.write('\n');
169
				outputStream.write('\n');
162
			outputStream.flush();
170
				outputStream.flush();
163
		}
171
			}
164
		} catch(IOException e) {
172
		} catch(IOException e) {
165
			// Ignore
173
			// Ignore
166
		}
174
		}

Return to bug 252060