Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75AE818C63 for ; Sat, 9 Jan 2016 10:18:40 +0000 (UTC) Received: (qmail 16915 invoked by uid 500); 9 Jan 2016 10:18:40 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 16824 invoked by uid 500); 9 Jan 2016 10:18:40 -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 16813 invoked by uid 99); 9 Jan 2016 10:18:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jan 2016 10:18:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DCE862C0451 for ; Sat, 9 Jan 2016 10:18:39 +0000 (UTC) Date: Sat, 9 Jan 2016 10:18:39 +0000 (UTC) From: "Siegfried Goeschl (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (EXEC-99) Provide a non-blocking PumpStreamHandler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Siegfried Goeschl created EXEC-99: ------------------------------------- Summary: Provide a non-blocking PumpStreamHandler Key: EXEC-99 URL: https://issues.apache.org/jira/browse/EXEC-99 Project: Commons Exec Issue Type: Improvement Affects Versions: 1.3 Reporter: Siegfried Goeschl Assignee: Siegfried Goeschl Fix For: 1.4 Sometimes the current PumpStreamHandler when a process is killed but its child process streams are processed by PumpStreamHandler * Closing the processed stream does seem not work * Using Thread.interrupt() does not work * Thread.stop() is deprecated and has no effect on JDK 8 * Hence the the stream pumper thread is stuck and can't terminate * So we hand in PumpStreamHandler().stop There was a bug fix to avoid hanging forever but this leaves the pumper thread behind which could break a production system. As a work-around I propose a "NonBlockingPumpStreamHandler" * use only on worker thread to process a streams * using Thread.sleep() between processing of the streams * can be stopped safely since there are no blocking operations * it will be much slower processing the streams which could block the child process It might be a good idea to hide those implementation behind a factory -- This message was sent by Atlassian JIRA (v6.3.4#6332)