Spread 4.0.0 C API

SP_kill (mailbox mbox);

  none connection handle to kill

Return Values
  0 Success
  ILLEGAL_SESSION The session specified by mbox is illegal. Usually because it is not active.

  SP_kill should be called when the application needs to close a connection to the Spread daemon, but does not want to notify the daemon about the close. The most common case of needing this is when a Spread client application calls the Unix function fork() and needs to close the connection in either the parent or child since the other will handle the communcation.

Generally the SP_disconnect() function should be used to disconnect from the daemon as it correctly and expediently notifies the daemon about the disconnection. If a client calls SP_kill instead of SP_disconnect when no other process has the client side mbox open (because of fork) then the network connection to the daemon will be closed and the daemon will detect the client as disconnected as soon as the network layer (TCP) registers a closed socket on the daemon side. Thus it will appear to the daemon as if a true network fault occurred or the client crashed as opposed to cleanly disconnecting.

  Header: Include sp.h
Library: Use libspread
Version: 4.0

Also See
  spread programmer's reference