Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 75113 invoked from network); 4 Jun 2010 07:51:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Jun 2010 07:51:22 -0000 Received: (qmail 44844 invoked by uid 500); 4 Jun 2010 07:51:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 44526 invoked by uid 500); 4 Jun 2010 07:51:20 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 44512 invoked by uid 99); 4 Jun 2010 07:51:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 07:51:19 +0000 X-ASF-Spam-Status: No, hits=-1497.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 07:51:18 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o547owp5010611 for ; Fri, 4 Jun 2010 07:50:58 GMT Message-ID: <22466185.179001275637857997.JavaMail.jira@thor> Date: Fri, 4 Jun 2010 03:50:57 -0400 (EDT) From: "Siegfried Goeschl (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (EXEC-42) Tutorial should include example for asynchronous handling In-Reply-To: <1494256186.1256296679389.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/EXEC-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl updated EXEC-42: ---------------------------------- Fix Version/s: 1.1 Affects Version/s: 1.0.1 1.0 > 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.