[fpc-devel] Problems with rapid fpSend calls on x64 Ubuntu 10.10 (updated)

Michael Van Canneyt michael at freepascal.org
Thu Dec 2 20:28:30 CET 2010



On Thu, 2 Dec 2010, Andrew Brunner wrote:

> On Thu, Dec 2, 2010 at 1:14 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> It would help if you could say what the exception exactly is ?
> 
> 
> Thanks Michael,
> 
> Well all I see is a SIGPIPE exception.  
> As stated before the actual FPC exception was not raised (or the except block was not executed) in there
> so I can't even log the error.  Does that help?

Yes.

This is a Unix signal (and not an exception in the pascal sense) which is not caught by the FPC rtl.
You should (when sending data to your socket) add the MSG_NOSIGNAL flag to fpSend (on Unix).

Have a look in fcl-web/src/base/custfcgi.pp to see how we do this.

(and look on internet for the meaning of the  MSG_NOSIGNAL flag :) )

Michael.


More information about the fpc-devel mailing list