You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2015/11/02 12:49:27 UTC
[jira] [Commented] (SSHD-576) InvertedShellWrapper would not
process all output from spawned processes
[ https://issues.apache.org/jira/browse/SSHD-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14985100#comment-14985100 ]
Goldstein Lyor commented on SSHD-576:
-------------------------------------
You are probably right, but please add a unit test to _InvertedShellWrapperTest_ that exposes the problem - e.g.:
{code:java}
@Test // see SSHD-576
public void testShellDiesBeforeAllDataExhausted() throws Exception {
....
}
{code}
Write the test *before* applying the patch and make sure it *fails*. Then apply the fix and make sure the test succeeds (w/o modifying the test code of course).
> InvertedShellWrapper would not process all output from spawned processes
> ------------------------------------------------------------------------
>
> Key: SSHD-576
> URL: https://issues.apache.org/jira/browse/SSHD-576
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 0.14.0
> Reporter: Gustaf Lundh
> Attachments: 0001-Fix.patch
>
>
> In some circumstances, where a spawned process outputs data just before it exits, the InvertedShellWrapper could return from InvertedShellWrapper.pumpStreams() before all data had been handled.
> To ensure all data is read, do not allow exit until the shell's/process' output streams are totally empty.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)