gspool_close(3)
NAME
gspool_close - close a GNUspool connection
SYNOPSIS
#include <gspool.h> int gspool_close(const int fd)
DESCRIPTION
The ggssppooooll__cclloossee(()) function is used to close a connection to GNUspool.
fd is a file descriptor previously returned by gspool_open or
gspool_login.
RETURN VALUES
GGssppooooll__cclloossee(()) 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)
COPYRIGHT
Copyright (c) 2009 Free Software Foundation, Inc. This is free
software. You may redistribute copies of it under the terms of the GNU
General Public License <http://www.gnu.org/licenses/gpl.html>. There
is NO WARRANTY, to the extent permitted by law.
AUTHOR
- John M Collins, Xi Software Ltd.