Hello,

 I have noticed a interesting thing. I am trying to close my connection to
client but I am getting weird error.

$r->internal_redirect("file");
shutdown($r->connection->fileno, 1) || die "$!";
......
......
do_some_internal_processing()
.....
.....

This code always die's with error "Bad file name".
$r->connection->fileno is always '5' for this particular case.

* CORE::shutdown, CORE::close, close, shutdown; all return same error.
* ls -l /proc/$$/fd  turns up the socket in the listing -- but it is owned by
root - and I am not doing any setuid.

s---------   0 root     root           0 Oct  7 05:03 5=

* Most weird .. CORE::shutdown or CORE::close don't turn up if I truss the
process, but I get the "Bad file name" error from my mod_perl application, and
in the die I can see apache doing shutdown(5,1) and close(5). Why don't my
CORE::close make it till the close() syscall ? Also if I do CORE::shutdown(5,1),
I still get the same error !!!

* I realised that mod_perl ties STDOUT to some package so untie *STDOUT, and
tried but I get the same error.

Could someone please suggest to me how I should close my connection to the
client from within mod_perl ?

I am using Apache/1.3.23 (Unix) mod_perl/1.26, on Solaris 2.6

I have been breaking my head on this for sometime now. Any suggestions are
mossst welcome.

regards
srp

Reply via email to