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:
hanna 2009-09-17 18:55:08 +00:00
parent 0e73b2ba8e
commit 355136928e
2 changed files with 6 additions and 1 deletions

View File

@ -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();
}

View File

@ -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();
}
/**