perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Chazelas <>
Subject Re: Fw: Re: mod_perl closes apache's stdin and/or stdout
Date Thu, 29 Mar 2007 21:53:04 GMT
On Thu, Mar 29, 2007 at 01:59:44PM -0700, Philip M. Gollucci wrote:
> Cough:
> 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_python, it's
with the fact that fd 1 is closed.

In my case, the problem was in run by mod_python.

That's a CVS/SVN web interface. 

viewvc is retrieving the output of some RCS commands (co,
rcsdiff) to retrieve information from a CVS repository.

To do that, it uses some home made fork/pipe handling.

It was doing:

pipe([fd1, fd2]);
dup2(fd2, 1);

But because apache's file descriptor 1 had been closed
beforehand by a mod_perl script called some time ago, the code
ended up doing something like dup2(15, 1); close(1) because fd1
was 1, allocated by pipe() as it was free.


View raw message