gspool_close - close a GNUspool connection
int gspool_close(const int fd)
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.
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.
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);
gspool_open(3)
John M Collins, Xi Software Ltd.