perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Gifford <sgiff...@suspectclass.com>
Subject Re: File Descriptor used by FileHandle under mod_perl 2.0.4 - is it a perl/mod_perl bug ?
Date Tue, 30 Jun 2009 19:07:25 GMT
Shibi NS <shibi.ns@gmail.com> writes:

[...]

> my $log = new FileHandle("process.log", "a");
>
> When I print the  $log->fileno it print FD as 0  and I have couple other log
> files opened after this all of these having random numbers like 12,15 etc. my
> believe is FD 0 used for STDIN . Is this is bug or aim doing
> something wrong ?

If you have closed FD 0, the next file opened will get that file
descriptor.  If that's the case, one solution is to open /dev/null
after closing FD 0; another is to just let the FD be 0, as long as it
works.

----Scott.

Mime
View raw message