---
name: "SP_disconnect"
section: "3"
platform: "linux"
package: "libspread1-dev"
version: "3.17.4-2+b1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/SP_disconnect"
---

# SP\_disconnect(3)

destroy connection between app and daemon

## NAME

SP\_disconnect - destroy connection between app and daemon

## SYNOPSIS

**#include \<sp.h\>**\
 **int SP\_disconnect( mailbox** *mbox***);**

## DESCRIPTION

**SP\_disconnect** should be called when the application is finished with a connection to the Spread daemon.  The application may have other connections still open to the daemon and may open a new connection after disconnecting.

The  *mbox* should be for the connection you wish to disconnect from.

## RETURN VALUES

Returns 0 on success or  **ILLEGAL\_SESSION** when the session  *mbox* given is not a valid connection.

## BUGS

None.

## AUTHOR

Yair Amir \<yairamir@cnds.jhu.edu\>\
 Jonathan Stanton \<jonathan@cnds.jhu.edu\>\
 Commedia Project \<commedia@cnds.jhu.edu\>

## SEE ALSO

[**libsp**(3)](/libsp/3.md)
