durusmail: quixote-users: detecting when quixote is not running as part of a fcgi process
detecting when quixote is not running as part of a fcgi process
2001-10-12
2001-10-15
detecting when quixote is not running as part of a fcgi process
Andrew Kuchling
2001-10-15
On Fri, Oct 12, 2001 at 04:59:35PM -0700, dan hitt wrote:
>Its test for non-fcgi is that the call
>   socket.fromfd(sys.stdin.fileno(),socket.AF_INET,socket.SOCK_STREAM)
>raises an exception for which the err is not errno.ENOTCONN.
>
>But on our system (NetBSD 1.5, apache 1.3.20, quixote 0.3 and quixote 0.4)
>the socket.fromfd(...) raises an exception and err is really and truly
>errno.ENOTCONN.

That test is described in section 2.2 of the FastCGI spec; see
http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S2.2 .  If the test
is wrong, it's not clear whether it's an error in the spec (most
likely) or a bug in NetBSD.  If you can suggest a more correct test,
we'd like to hear about it, and the authors of the FastCGI spec should
also be informed.

--amk



reply