pbs_disconnect man page
pbs_disconnect — disconnect from a pbs batch server
int pbs_disconnect(int connect)
The virtual stream connection specified byconnect, which was established with a server by a call to pbs_connect(), is closed.
When the connection to batch server has been successfully closed, the routine will return zero. Otherwise, a non zero error is returned. The error number is also set in pbs_errno.