Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 82743 invoked from network); 18 Feb 2010 09:46:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2010 09:46:18 -0000 Received: (qmail 8650 invoked by uid 500); 18 Feb 2010 09:46:18 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 8599 invoked by uid 500); 18 Feb 2010 09:46:18 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 8591 invoked by uid 99); 18 Feb 2010 09:46:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 09:46:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.222.202] (HELO mail-pz0-f202.google.com) (209.85.222.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 09:46:08 +0000 Received: by pzk40 with SMTP id 40so5678323pzk.7 for ; Thu, 18 Feb 2010 01:45:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.59.7 with SMTP id h7mr4024552wfa.267.1266486344612; Thu, 18 Feb 2010 01:45:44 -0800 (PST) In-Reply-To: References: <4B6C2FE7.60308@ice-sa.com> <4B7B1B83.8050002@msg.com.mx> Date: Thu, 18 Feb 2010 01:45:44 -0800 Message-ID: Subject: Fwd: [mp2] mod_perl closes apache's stdin and/or stdout From: Fred Moyer To: dev@perl.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Does httpd provide an api through which file descriptors can be reallocated (probably with XS I'm guessing) into Apache::Fd or something near? ---------- Forwarded message ---------- From: Heiko Weber Date: Thu, Feb 18, 2010 at 12:21 AM Subject: Re: [mp2] mod_perl closes apache's stdin and/or stdout To: Salvador Ortiz Garcia Cc: mod_perl list Salvador, to avoid such issues my "external" tasks don't use STDOUT, STDIN or STDERR. They take their parameters from control files and write their results back to a status file. This tasks don't send any output back to the browsers. As I said, usually some "sudo's to change some system settings. Well, I could replace all system() calls and just store the task jobs into a database table, to schedule a background job with cron to check and complete this tasks, but then I lost the immediately feedback to the user/browser ... AND this is a lot of work for me - =A0unless I can exactly repeat the issue I am not sure if it is worth to try it. Currently it feels to me like a "leakage", sometimes a httpd/mod_perl/process do something, and later (maybe when working on the next client request) STDOUT is closed. This makes it hard to create a sample program to repeat it. Within a single script I can do almost everything: call system(), open DBI connections, write to STDOUT, ... everything seems to be fine. Heiko Am 16.02.2010 um 23:26 schrieb Salvador Ortiz Garcia: On 02/05/2010 12:16 PM, Heiko Weber wrote: Hi Andr=E9, I know what you mean, and I can't agree with you - the server response time is really low - most pages are finished loading in less 1-2 seconds, and the overall load of the server is at a low level. I believe there is an issue, maybe something what Jon is talking about, I also using some "system()" call's to execute sendmail or sudo tasks, so maybe STDOUT really gets closed - I have no idea. I only see the abort messages in errorlog very frequent, maybe 3-4 per minute. Heiko Of course STDOUT, STDIN, and STDERR get closed, not by mod_perl but by apache. Every UNIX =A0process when demonized must close them to detach from its controling terminal. Apache reopens STDERR to its log file, but STDOUT and STDIN remain closed. Maybe de confusion arises from the fact that when executing a CGI the server connects them to the client socket, but in mod_perl you are in the deamon process space. Please check "Advanced Programing in the UNIX environment", chapter 13: "Daemon processes" by W. Richard Stevens. Regards. Salvador. -- Wecos <> Heiko Weber Computer Systeme D-21644 Sauensiek <> Immenweg 5 heiko@wecos.de <>=A0http://www.wecos.de Tel. +49 (4169) 91000 <> Fax +49 (4169) 919033 _______________________________________________________________ This email may contain confidential and privileged material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. _______________________________________________________________ Diese E-Mail kann digital signiert sein. Falls Ihr E-Mail-Programm nicht ueber die notwendigen Prueffunktionen verfuegt, ignorieren Sie bitte die angehaengte Signatur-Datei. _______________________________________________________________ This email may be digitally signed. If your email software does not support the necessary validation feature, please disregard the attached signature file. _______________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org