[fpc-pascal]General error trapping

Marco van de Voort marcov at stack.nl
Wed Dec 20 16:29:57 CET 2000


> BigMatt19> envrironment.  Right now I am trying to trap a "broken pipe" error.  I am
> BigMatt19> assuming that this error would be written to linuxerror, but what directive 
> BigMatt19> do I put a + sign to that will stop the program from crashing?  Also, if 
> BigMatt19> there is a general tutorial online about this sort of thing it would be 
> BigMatt19> really cool if I could check that out.
> 
> Is, one way is to set signal handler , another is mask that interrupt
> for your process and if you got this signal when you try to send data
> to socket closed from other side, you should specify last parameter as
> MSG_NOSIGNAL its equal 16384.
> 
> about signal handling with C lib :
> http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html

The entry in the FPC Units manual for Linux.Sigaction probably also contains
such example.




More information about the fpc-pascal mailing list