Poster of Linux kernelThe best gift for a Linux geek
gspool_close

gspool_close

Section: GNUspool Print Manager (3) Updated: 2009-05-18
Local index Up
 

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)  

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.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
EXAMPLE
SEE ALSO
COPYRIGHT
AUTHOR

This document was created by man2html, using the manual pages.
Time: 21:47:33 GMT, April 16, 2011