NAME

gspool_close - close a GNUspool connection


SYNOPSIS

#include <gspool.h>

int gspool_close(const int fd)


DESCRIPTION

The gspool_close() function is used to close a connection to GNUspool. fd is a file descriptor previously returned by gspool_open or gspool_login.


RETURN VALUES

Gspool_close() returns 0 if successful or GSPOOL_INVALID_FD (Invalid File descriptor, a constant defined in gspool.h) if the passed file descriptor was not valid, perhaps because it was never opened successfully.


EXAMPLE

An example showing a connection being opened then closed:

 int     fd;
 fd = gspool_open("myhost", (char *)0, 0);
 if (fd < 0) {  /* error handling */
     ...
 }
 /* process connection */
 gspool_close(fd);


SEE ALSO

gspool_open(3)


AUTHOR

John M Collins, Xi Software Ltd.