mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SSHD-125) InvertedShellWrapper won't pump end of stream
Date Fri, 07 Oct 2011 06:16:29 GMT

     [ 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

       

Mime
View raw message