Indy 9 | Content | Index | Reference

BlockSIGPIPE
See Also
Blocks the SIGPIPE signal on the Linux platform.
Description
BlockSIGPIPE is a procedure defined and used on the Linux platform to suspend the action handler for the SIGPIPE signal. SIGPIPE can be raised when the active listener for a blocking socket operation has been disconnected or reset (indicated by the error number ECONNRESET). This condition can occur on some systems during protocol exchanges, or when a thread terminates in a server application.

BlockSIGPIPE is called from the initialization section of the IdStackLinux.pas unit after assigning the GSocketListClass for the platform.

BlockSIGPIPE creates a signal set that includes the SIGPIPE signal number, and masks the blocked signalled using sigprocmask during the lifetime of the Linux protocol stack handler.

If an application is interested in the SIGPIPE signal, it must call UnblockSIGPIPE to re-enable the signal action handler. The application must then handle or ignore signals raised during execution.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.