Bug 577189 - Not all output available in eclipse when processes wrapped with RuntimeProcess is terminated
Summary: Not all output available in eclipse when processes wrapped with RuntimeProces...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.22   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-10 09:41 EST by Jonah Graham CLA
Modified: 2021-11-10 10:00 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2021-11-10 09:41:17 EST
Bug 576945 substantially improved the situation where not all output was captured from a RuntimeProcess. However there is still a case where OutputStreamMonitor thread is killed/terminated before all the available output is received.

This can be simulated by having the read method run slowly, as is demonstrated by org.eclipse.debug.tests.console.RuntimeProcessTests.testOutputAfterDestroy() and the sleep in org.eclipse.debug.tests.console.MockProcess.MockProcess().new InputStream() {...}.read()

The RuntimeProcessTests.testOutputAfterDestroy is ignored and should be enabled to test that this works.

There probably should be a timeout between the process terminating and giving up on the OutputStreamMonitor terminating. At the moment the OutputStreamMonitor is killed as soon as the process.destory() completes.
Comment 1 Eclipse Genie CLA 2021-11-10 09:49:23 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/187593