[fpc-pascal] How to handle External:SIGPIPE on linux

Dennis dec12 at avidsoft.com.hk
Fri May 31 13:31:44 CEST 2013


I am using LNet 's SSL sockets on ubuntu.
When I use a self signed certificate and the browser gets a warning, it 
seems the browser immediately send a close-notify or shutdown ssl signal 
to the server and then without waiting close the connection.

On my server side (written with Lnet  SSL), it did not know the 
connection was closed already and still thinking of handling the 
close-notify + shutdown tries to shutdown the SSL on its side and then 
encounter the serious PIPE error (which I guess it tries to send 
acknowledge of the close-notify/shutdown back to the browser) when the 
pip is already closed.  I guess Lnet SSL implementation is not aware 
that the other side can close the connection without waiting for its 
acknowledgement.

This external SIGPIPE immediately crash the program even though the 
original Lnet codes has a try except block.

Is there something I can do to trap this external SIGPIPE?

(I tried emaillng the author but no response for weeks).

Thanks a lot in advance.

Dennis Poon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130531/8fc0d138/attachment.html>


More information about the fpc-pascal mailing list