FILENO method returns a defined but invalid value (can never be defined
as the error return from the syscall is -1) to placate things such as
IPC::Run which call fileno to check if a filehandle is open.
Closes bugs:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544540
http://rt.cpan.org/Public/Bug/Display.html?id=50972
Removes need for upstream patch in OpenBSD
+ o Add FILENO method which returns a defined but invalid value to
+ placate things such as IPC::Run which call fileno to check if a
+ filehandle is open.
+ Closes bugs:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544540
+ http://rt.cpan.org/Public/Bug/Display.html?id=50972
+ Removes need for upstream patch in OpenBSD
+
Version 0.68 -- 21 June 2003 <skimo@kotnet.org> Sven Verdoolaege
o Call the fcgi lib's attach/detach <robs@fastcgi.com>
}
}
-# Apparently some use fileno to determine if a filehandle is open,
-# so we might want to return a defined, but meaningless value.
-# An alternative would be to return the fcgi stream fd.
-# sub FILENO { -2 }
+# Some things (e.g. IPC::Run) use fileno to determine if a filehandle is open,
+# so we return a defined, but meaningless value. (-1 being the error return
+# value from the syscall in c, meaning it can never be a valid fd no)
+# Probably a better alternative would be to return the fcgi stream fd.
+sub FILENO { -1 }
1;