You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (Closed) (JIRA)" <ji...@apache.org> on 2011/10/07 08:16:29 UTC

[jira] [Closed] (SSHD-125) InvertedShellWrapper won't pump end of stream

     [ https://issues.apache.org/jira/browse/SSHD-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet closed SSHD-125.
--------------------------------

    Resolution: Duplicate
    
> InvertedShellWrapper won't pump end of stream
> ---------------------------------------------
>
>                 Key: SSHD-125
>                 URL: https://issues.apache.org/jira/browse/SSHD-125
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: René Treffer
>
> The "pumpStreams" method ( http://svn.apache.org/viewvc/mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/shell/InvertedShellWrapper.java#l89 ) of InvertedShellWrapper has a loop that won't collect the last output of a process.
> The faulty event sequence looks like this:
> 1. process alive? -> yes
> 2. Anything to pump? -> no
> 3. Thread.sleep(1)
> 4. process alive? -> no
> 5. call exit handler and end pump thread
> This will obviously discard any output of the process during step 3 and 4.
> The solution would be to pump all pending output before the exit handler gets called (while (pumpStream(shellOut, out, buffer) || pumpStream(shellErr, err, buffer)) {}).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira