You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Maya Belcheva (JIRA)" <ji...@apache.org> on 2010/07/13 16:56:51 UTC

[jira] Commented: (EXEC-42) Tutorial should include example for asynchronous handling

    [ https://issues.apache.org/jira/browse/EXEC-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887784#action_12887784 ] 

Maya Belcheva commented on EXEC-42:
-----------------------------------

Hello. 
I have two questions:
1. Where I can find this updated version of the titorial? 
The only one that I found was http://commons.apache.org/exec/tutorial.html , but this one doesn't contain the comments included here and furthermore - the code available to download with this titorial was for another version (http://commons.apache.org/exec/download_exec.cgi) so the DefaultExecuteResultHandler class wasn't found.

2. I'm interested how one can read the OutputStream and the ErrorStream from the executed programme so is it possible to include such example in the titorial if it's not already done?

Thank you in advance.

> Tutorial should include example for asynchronous handling
> ---------------------------------------------------------
>
>                 Key: EXEC-42
>                 URL: https://issues.apache.org/jira/browse/EXEC-42
>             Project: Commons Exec
>          Issue Type: Improvement
>    Affects Versions: 1.0, 1.0.1
>            Reporter: Konrad Windszus
>            Assignee: Siegfried Goeschl
>             Fix For: 1.1
>
>
> I had some difficulties figuring out, how to asynchronously start a process. You should include an example for this on the tutorial page. Especially interesting is the following:
> - How to start it (explain ExecuteResultHandler and that the callbacks are called from another thread, so these should be implemented thread-safe)
> - How to know if it is still running (not possible via watchdog, but has to be implemented for oneself using the ExecuteResultHandler, again watch out for thread safety)
> - How to force to terminate a process (using the watchdog)
> - Add a hint about StreamHandler and that you should always use a PumpStreamHandler (otherwise this could lead to deadlocks, see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?).
> - Add an explanation of exit values, since an exit value which is not in the list of the DefaultExecutor, leads automatically to an exception, which is not clear from the javadocs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.