Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-03 Thread Stas Bekman
Stephane Chazelas wrote: On Mon, Apr 02, 2007 at 03:52:50PM -0700, Stas Bekman wrote: Stephane, you are correct in your observations that original STDIN and STDOUT filehandles are not preserved when perlio CGI mode is used. This is because how Perl works. Consider the following perl program, ru

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-03 Thread Stephane Chazelas
On Mon, Apr 02, 2007 at 03:52:50PM -0700, Stas Bekman wrote: > Stephane, you are correct in your observations that original STDIN and > STDOUT filehandles are not preserved when perlio CGI mode is used. > > This is because how Perl works. Consider the following perl program, run from > the comman

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-02 Thread Stas Bekman
William A. Rowe, Jr. wrote: Stas Bekman wrote: William A. Rowe, Jr. wrote: Stas Bekman wrote: But which file to open as a place holder? In this example I use /dev/null and it works as you wish. AFAIK, windows doesn't have /dev/null, unless you run on cygwin. Of course, it does, but it has the

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-02 Thread William A. Rowe, Jr.
Stas Bekman wrote: > William A. Rowe, Jr. wrote: >> Stas Bekman wrote: >>> But which file to open as a place holder? In this example I use >>> /dev/null and it works as you wish. AFAIK, windows doesn't have >>> /dev/null, unless you run on cygwin. >> >> Of course, it does, but it has the classic MS

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-02 Thread Stas Bekman
William A. Rowe, Jr. wrote: Stas Bekman wrote: But which file to open as a place holder? In this example I use /dev/null and it works as you wish. AFAIK, windows doesn't have /dev/null, unless you run on cygwin. Of course, it does, but it has the classic MS-DOS name of "NUL" present in the con

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-02 Thread William A. Rowe, Jr.
Stas Bekman wrote: > > But which file to open as a place holder? In this example I use > /dev/null and it works as you wish. AFAIK, windows doesn't have > /dev/null, unless you run on cygwin. Of course, it does, but it has the classic MS-DOS name of "NUL" present in the context of any directory (

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-04-02 Thread Stas Bekman
Stephane, you are correct in your observations that original STDIN and STDOUT filehandles are not preserved when perlio CGI mode is used. This is because how Perl works. Consider the following perl program, run from the command line (not mod_perl!): #!/usr/bin/perl use strict; use warnings;

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Philip M. Gollucci
Stephane Chazelas wrote: On Thu, Mar 29, 2007 at 01:59:44PM -0700, Philip M. Gollucci wrote: Cough: http://p6m7g8.net No issues here. [...] Yes, I know what viewvc is -- its actually running there too. I'm about to be on vacation (away from computers) and have some stuff to do first. I'll b

Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Stephane Chazelas
On Thu, Mar 29, 2007 at 11:01:57PM +0100, Stephane Chazelas wrote: [...] > COMMAND PID USER FD TYPE DEVICESIZE NODE NAME > [...] > sh 19113 www-data0r CHR 1,3 1673 /dev/null > sh 19113 www-data1w CHR 1,3 1673 /dev/null > sh

Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Stephane Chazelas
On Thu, Mar 29, 2007 at 09:06:20PM +0100, Stephane Chazelas wrote: [...] > print STDOUT "..."; > actually did a write(16, "..."), so STDOUT was affected another > fd that 1. Tomorrow, I'll try doing a system() within perl, but > I suspect for instance system("echo foo") will no output > anything to

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Stephane Chazelas
On Thu, Mar 29, 2007 at 01:59:44PM -0700, Philip M. Gollucci wrote: > Cough: http://p6m7g8.net > No issues here. [...] Thanks Philip, I would still run lsof -ac apache2 -d0,1 on that host. You may find that some of the processes have their fd 1 closed. The problem is not especially with mod_pytho

Re: Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Philip M. Gollucci
Cough: http://p6m7g8.net No issues here. -- Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/EC88A

Fw: Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Frank Wiles
elas <[EMAIL PROTECTED]> Subject: Re: mod_perl closes apache's stdin and/or stdout On Thu, 29 Mar 2007 21:06:20 +0100 Stephane Chazelas <[EMAIL PROTECTED]> wrote: > Hi Frank, > > the problem I'm talking about is not that the CGI's STDIN/STDOUT > is reaff

Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Stephane Chazelas
On Thu, Mar 29, 2007 at 02:49:36PM -0500, Frank Wiles wrote: > On Thu, 29 Mar 2007 10:12:00 +0100 > Stephane Chazelas <[EMAIL PROTECTED]> wrote: > > > On Wed, Mar 28, 2007 at 11:46:15AM +0100, Stephane Chazelas wrote: > > > 1. Problem Description: > > > > > > Hiya, > > > > > > After querying

Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Frank Wiles
On Thu, 29 Mar 2007 10:12:00 +0100 Stephane Chazelas <[EMAIL PROTECTED]> wrote: > On Wed, Mar 28, 2007 at 11:46:15AM +0100, Stephane Chazelas wrote: > > 1. Problem Description: > > > > Hiya, > > > > After querying a mod_perl run CGI, the corresponding apache2 > > process ends up having its

Re: mod_perl closes apache's stdin and/or stdout

2007-03-29 Thread Stephane Chazelas
On Wed, Mar 28, 2007 at 11:46:15AM +0100, Stephane Chazelas wrote: > 1. Problem Description: > > Hiya, > > After querying a mod_perl run CGI, the corresponding apache2 > process ends up having its fd 0 and/or fd 1 closed. This then > causes some other CGIs (for instance mod_python's viewv