From 14714c05e10fe2baafdd798caf972ea6169b1572 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 8 Jul 2009 19:54:47 +0000 Subject: [PATCH] [282919] [dstore] server shutdown results in exception in shell io reading --- .../universal/miners/command/OutputHandler.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java index ccc61976360..acf1f005130 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 IBM Corporation and others. + * Copyright (c) 2006, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems * David McKnight (IBM) - [243699] [dstore] Loop in OutputHandler * David McKnight (IBM) [249715] [dstore][shells] Unix shell does not echo command + * David McKnight (IBM) - [282919] [dstore] server shutdown results in exception in shell io reading *******************************************************************************/ package org.eclipse.rse.internal.dstore.universal.miners.command; @@ -165,7 +166,14 @@ public class OutputHandler extends Handler { // re-determine available if none available now if (available == 0) { - lookahead = _reader.read(); + try { + lookahead = _reader.read(); + } + catch (IOException e){ + // pipe closed + return null; + } + if (lookahead == -1) { return null; } else {