Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C63BE2B4 for ; Wed, 5 Dec 2012 00:05:35 +0000 (UTC) Received: (qmail 86413 invoked by uid 500); 5 Dec 2012 00:05:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 86337 invoked by uid 500); 5 Dec 2012 00:05:32 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 86326 invoked by uid 99); 5 Dec 2012 00:05:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 00:05:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 00:05:27 +0000 Received: by mail-vc0-f173.google.com with SMTP id f13so4897420vcb.18 for ; Tue, 04 Dec 2012 16:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mmrZ3Kocp3O39KjYSNlqBfaTVDdg2jOhbLOKtxRqNm4=; b=zlHDX8S1hmouF/e3f0EEOuTePBXN+IhRjA1je54tfAj5/bRKqXxqrHV283Y8Vweh2m CV/AkECK6Ma1ZJ0RJG0n812vFBWTuENBigaOSgKZDx57wL0y0C+Ybsvk/1YrlH1XnG/8 R+AiGlNua5hawHOwuhY4XgK3krIQ1ShNRCVbkBd/bnavFNPqsUxlBw9PuH+mYbN77lTR AVap094x5hh8MWDNo4dh10o3Kj+G9JwpeiPqCObebHlMbgPmjpDrsuEgwygF/VTPfd3w 2bGuj9+vAU+2bVKCJC9hXhaO7v+Rde3UKPSDvLsWiwY6Jje8EFdBQzV762CmW/PxwfHW Uopw== MIME-Version: 1.0 Received: by 10.220.154.148 with SMTP id o20mr13237751vcw.54.1354665906562; Tue, 04 Dec 2012 16:05:06 -0800 (PST) Received: by 10.58.249.199 with HTTP; Tue, 4 Dec 2012 16:05:06 -0800 (PST) In-Reply-To: <50AFC14A.5060007@christopherschultz.net> References: <50AFC14A.5060007@christopherschultz.net> Date: Wed, 5 Dec 2012 04:05:06 +0400 Message-ID: Subject: Re: Page not redirected after waitFor() call on Process object. From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2012/11/23 Christopher Schultz : > On 11/21/12 4:42 AM, Andrei Petru Mura wrote: >> TheProcessing.logoutSubscriberByMac(mac) has that code on it: >> >> public static void logoutSubscriberByMac(String mac) { try { >> >> Process proc = Runtime.getRuntime().exec("logout subscriber >> command"); proc.waitFor(); //here is the problem > > You almost certainly have a problem with stream management: if you > don't drain both the output stream and error stream of the process, > then your code can hang. Likewise, if you don't close the standard > input stream to the process, the child process may block waiting for > input. > > It sounds silly, even if you use little or no standard input or output > from your child process, but failure to manage these streams can and > will hang up your Java code. > > You can either write multi-threaded code to handle all these streams, > or you can use one of the several high-quality utility libraries out > there that can wrap Runtime.exec for you and take care of this kind of > stuff. > +1. There was also such thread in June as "Issue with keep-alive connections, when using APR Connector on Windows and starting Processes from Servlets" where some JRE bugs were mentioned. http://markmail.org/thread/hsime5ayjdrg4fwm I do not know much about your configuration to tell whether this is affecting you or not. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org