[ 
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)

Reply via email to