Play nice with other jobs in this VM -- don't close stdout / stderr.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1646 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
0e73b2ba8e
commit
355136928e
|
|
@ -87,6 +87,11 @@ public class OutputStreamStorage extends OutputStream implements Storage<OutputS
|
|||
* @{inheritDoc}
|
||||
*/
|
||||
public void close() {
|
||||
// Don't close System.out or System.err; this'll cause trouble
|
||||
// with subsequent code running in this VM.
|
||||
if( outputStream == System.out || outputStream == System.err )
|
||||
return;
|
||||
|
||||
try {
|
||||
outputStream.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class OutputStreamStub extends OutputStream implements Stub<OutputStream>
|
|||
* @{inheritDoc}
|
||||
*/
|
||||
public void flush() throws IOException {
|
||||
outputTracker.getStorage(this).close();
|
||||
outputTracker.getStorage(this).flush();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue