On Thu, Mar 29, 2007 at 11:01:57PM +0100, Stephane Chazelas wrote:
[...]
> COMMAND   PID     USER   FD   TYPE   DEVICE    SIZE     NODE NAME
> [...]
> sh      19113 www-data    0r   CHR      1,3             1673 /dev/null
> sh      19113 www-data    1w   CHR      1,3             1673 /dev/null
> sh      19113 www-data    2w   REG      8,9 2041426   244362 
> /var/log/apache2/error.log
> [...]
> sh      19113 www-data   16u  IPv4 14009527              TCP 
> ant.artesyncp.com:www->ant.artesyncp.com:43127 (ESTABLISHED)
> 
> fds 0 and 1 are /dev/null as they should be if apache was not running modperl
> because modperl does
> 
> 
> dup(0);
> close(0);
> dup(1);
> close(1);
> 
> so that the second dup assigns stdin as a copy of stdout!
[...]

Well, actually, I get that when I run the script twice with the
same apache process.

On the first time, I rather get instead:


sh      14044 www-data    0w   CHR      1,3             1673 /dev/null
sh      14044 www-data    2w   REG      8,9 2047900   244362 
/var/log/apache2/error.log
[...]
sh      14044 www-data   16u  IPv4 14051633              TCP 
ant.astec.com:www->ant.astec.com:39533 (ESTABLISHED)

which does tie up with

dup(0);
close(0);
dup(1);
close(1);

Sorry about the confusion,
Stephane

Reply via email to