Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 1755 invoked from network); 23 Oct 2009 11:18:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 11:18:22 -0000 Received: (qmail 12171 invoked by uid 500); 23 Oct 2009 11:18:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12061 invoked by uid 500); 23 Oct 2009 11:18:22 -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 12043 invoked by uid 99); 23 Oct 2009 11:18:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 11:18:22 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 11:18:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 642AF234C045 for ; Fri, 23 Oct 2009 04:17:59 -0700 (PDT) Message-ID: <1494256186.1256296679389.JavaMail.jira@brutus> Date: Fri, 23 Oct 2009 11:17:59 +0000 (UTC) From: "Konrad Windszus (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (EXEC-42) Tutorial should include example for asynchronous handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 Reporter: Konrad Windszus 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.