---
name: "SP_leave"
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_leave"
---

# SP\_leave(3)

create connection between app and daemon

## NAME

SP\_leave - create connection between app and daemon

## SYNOPSIS

**#include \<sp.h\>**\
 **int SP\_leave( mailbox** *mbox***, const char \****group***);**

## DESCRIPTION

**SP\_leave** leaves a group with the name passed as the string *group.* If the group does not exist amoung the Spread daemons this operation is ignored, otherwise the Leave leaves the existing group. The *mbox* of the connection upon which to leave a group is the first parameter.\</P\> The *group*\
  string represents the name of the group to leave.

## RETURN VALUES

Returns 0 on success or one of the following errors ( \< 0 ):

- **ILLEGAL\_GROUP**

  The  *group* given to leave was illegal for some reason. Usually because it was of  length 0 or length \> MAX\_GROUP\_NAME

- **ILLEGAL\_SESSION**

  The session specified by *mbox* is illegal. Usually because it is not active.

- **CONNECTION\_CLOSED**

  During communication errors occured and the leave could not be initiated.

## 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)
