]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Domain socket fixes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 6 Jul 2004 00:35:31 +0000 (00:35 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 6 Jul 2004 00:35:31 +0000 (00:35 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@4327 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http-addr.c
cups/http.c
doc/overview.html
scheduler/cups-polld.c
scheduler/testspeed.c

index 0c414a7c75d6b9a13532312946a6b66881bd6870..bdc1333f7ec114bf9396908fb9317ffb90ed8845 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http-addr.c,v 1.1.2.17 2004/06/29 20:33:11 mike Exp $"
+ * "$Id: http-addr.c,v 1.1.2.18 2004/07/06 00:35:31 mike Exp $"
  *
  *   HTTP address routines for the Common UNIX Printing System (CUPS).
  *
@@ -145,8 +145,10 @@ httpAddrLocalhost(const http_addr_t *addr)
     return (1);
 #endif /* AF_INET6 */
 
+#ifdef AF_LOCAL
   if (addr->addr.sa_family == AF_LOCAL)
     return (1);
+#endif /* AF_LOCAL */
 
   if (addr->addr.sa_family == AF_INET &&
       ntohl(addr->ipv4.sin_addr.s_addr) == 0x7f000001)
@@ -175,6 +177,9 @@ httpAddrLookup(const http_addr_t *addr,             /* I - Address to lookup */
   struct hostent       *host;                  /* Host from name service */
 
 
+  DEBUG_printf(("httpAddrLookup(addr=%p, name=%p, namelen=%d)\n",
+                addr, name, namelen));
+
 #ifdef AF_INET6
   if (addr->addr.sa_family == AF_INET6)
     host = gethostbyaddr(ADDR_CAST &(addr->ipv6.sin6_addr),
@@ -216,6 +221,9 @@ httpAddrString(const http_addr_t *addr,             /* I - Address to convert */
                char              *s,           /* I - String buffer */
               int               slen)          /* I - Length of string */
 {
+  DEBUG_printf(("httpAddrString(addr=%p, s=%p, slen=%d)\n",
+                addr, s, slen));
+
 #ifdef AF_INET6
   if (addr->addr.sa_family == AF_INET6)
     snprintf(s, slen, "%u.%u.%u.%u",
@@ -243,6 +251,8 @@ httpAddrString(const http_addr_t *addr,             /* I - Address to convert */
   else
     strlcpy(s, "UNKNOWN", slen);
 
+  DEBUG_printf(("httpAddrString: returning \"%s\"...\n", s));
+
   return (s);
 }
 
@@ -262,6 +272,8 @@ httpGetHostByName(const char *name) /* I - Hostname or IP address */
   static struct hostent        host_ip;        /* Host entry for IP/domain address */
 
 
+  DEBUG_printf(("httpGetHostByName(name=\"%s\")\n", name));
+
 #if defined(__APPLE__)
   /* OS X hack to avoid it's ocassional long delay in lookupd */
   static const char sLoopback[] = "127.0.0.1";
@@ -297,6 +309,8 @@ httpGetHostByName(const char *name) /* I - Hostname or IP address */
     packed_ptr[0]       = (char *)name;
     packed_ptr[1]       = NULL;
 
+    DEBUG_puts("httpGetHostByName: returning domain socket address...");
+
     return (&host_ip);
   }
 #endif /* AF_LOCAL */
@@ -331,6 +345,8 @@ httpGetHostByName(const char *name) /* I - Hostname or IP address */
     packed_ptr[0]       = (char *)(&packed_ip);
     packed_ptr[1]       = NULL;
 
+    DEBUG_puts("httpGetHostByName: returning IPv4 address...");
+
     return (&host_ip);
   }
   else
@@ -340,11 +356,13 @@ httpGetHostByName(const char *name)       /* I - Hostname or IP address */
     * the name...
     */
 
+    DEBUG_puts("httpGetHostByName: returning domain lookup address(es)...");
+
     return (gethostbyname(name));
   }
 }
 
 
 /*
- * End of "$Id: http-addr.c,v 1.1.2.17 2004/06/29 20:33:11 mike Exp $".
+ * End of "$Id: http-addr.c,v 1.1.2.18 2004/07/06 00:35:31 mike Exp $".
  */
index 11672a6b150d53939e8ba7c0085f3c29d0f88d61..4930c9686c9b30126fcc543b9e4086965939bcc6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c,v 1.82.2.54 2004/07/02 04:08:59 mike Exp $"
+ * "$Id: http.c,v 1.82.2.55 2004/07/06 00:35:31 mike Exp $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
@@ -383,17 +383,18 @@ httpConnectEncrypt(const char *host,      /* I - Host to connect to */
   }
 
  /*
-  * Verify that it is an IPv4 address (IPv6 support will come in CUPS 1.2...)
+  * Verify that it is an IPv4, IPv6, or domain address...
   */
 
+  if ((hostaddr->h_addrtype != AF_INET || hostaddr->h_length != 4)
 #ifdef AF_INET6
-  if ((hostaddr->h_addrtype != AF_INET || hostaddr->h_length != 4) &&
-      (hostaddr->h_addrtype != AF_INET6 || hostaddr->h_length != 16))
-    return (NULL);
-#else
-  if (hostaddr->h_addrtype != AF_INET || hostaddr->h_length != 4)
-    return (NULL);
+      && (hostaddr->h_addrtype != AF_INET6 || hostaddr->h_length != 16)
 #endif /* AF_INET6 */
+#ifdef AF_LOCAL
+      && (hostaddr->h_addrtype != AF_LOCAL)
+#endif /* AF_LOCAL */
+      )
+    return (NULL);
 
  /*
   * Allocate memory for the structure...
@@ -2521,5 +2522,5 @@ CDSAWriteFunc(SSLConnectionRef connection,        /* I  - SSL/TLS connection */
 
 
 /*
- * End of "$Id: http.c,v 1.82.2.54 2004/07/02 04:08:59 mike Exp $".
+ * End of "$Id: http.c,v 1.82.2.55 2004/07/06 00:35:31 mike Exp $".
  */
index d84f17851d2c0d7b82b02ef8a2ed752abfe1202c..fea0ac3462e243a583337623230637cf28fcd413 100644 (file)
-<HTML>
-<HEAD>
-       <META NAME="Author" CONTENT="Michael Sweet">
-       <TITLE>An Overview of the Common UNIX Printing System</TITLE>
-       <LINK REL=STYLESHEET TYPE="text/css" HREF="cupsdoc.css">
-</HEAD>
-<BODY>
-<TABLE WIDTH="100%">
-<TR VALIGN=TOP>
-       <TD><IMG SRC="images/cups-large.gif" WIDTH="103" HEIGHT="120"></TD>
-       <TD><H1 ALIGN="RIGHT">An Overview of the<BR>
-       Common UNIX Printing System,<BR>
-       Version 1.2</H1>
-
-       <P ALIGN="RIGHT">August 14, 2002<BR>
-       Michael Sweet, Easy Software Products<BR>
-       Copyright 1998-2003, All Rights Reserved.</P>
-       </TD>
-</TR>
-</TABLE>
-
-<P>This whitepaper describes the Common UNIX Printing
-System<SUP>TM</SUP> ("CUPS<SUP>TM</SUP>"), a portable and extensible
-printing system for UNIX<SUP>&reg;</SUP>. CUPS is being developed by
-<A HREF="http://www.easysw.com">Easy Software Products</A>, a software
-firm located in Hollywood, Maryland that has been selling commercial
-software for UNIX since 1993 through more than 40 distributors serving
-over 80 countries worldwide.
-
-<P>Additional information on CUPS is available on the World Wide Web at
-"<A HREF="http://www.cups.org">http://www.cups.org</A>".
-
-<H2>Background</H2>
-
-<P>Printing within UNIX has historically been done using one of two
-printing systems - the Berkeley Line Printer Daemon ("LPD") [RFC1179]
-and the AT&amp;T Line Printer system. These printing systems were
-designed in the 70's for printing text to line printers; vendors have
-since added varying levels of support for other types of printers.
-
-<P>Replacements for these printing systems have emerged [LPRng,
-Palladin, PLP], however none of the replacements change the fundamental
-capabilities of these systems.
-
-<P>Over the last few years several attempts at developing a standard
-printing interface have been made, including the draft POSIX Printing
-standard developed by the Institute of Electrical and Electronics
-Engineers, Inc. ("IEEE") [IEEE-1387.4] and Internet Printing Protocol
-("IPP") developed by the Internet Engineering Task Force ("IETF")
-through the Printer Working Group ("PWG") [IETF-IPP]. The POSIX
-printing standard defines a common set of command-line tools as well as
-a C interface for printer administration and print jobs, but has been
-shelved by the IEEE.
-
-<P>The Internet Printing Protocol defines extensions to the HyperText
-Transport Protocol 1.1 [RFC2616] to provide support for remote printing
-services. IPP/1.0 was accepted by the IETF as an experimental Request
-For Comments [RFC] document in October of 1999. Since then the Printer
-Working Group has developed an updated set of specifications for
-IPP/1.1 which have been accepted by the IETF and are awaiting
-publication as proposed standards. Unlike POSIX Printing, IPP enjoys
-widespread industry support and is poised to become the standard
-network printing solution for all operating systems.
-
-<P>CUPS uses IPP/1.1 to provide a complete, modern printing system for
-UNIX that can be extended to support new printers, devices, and
-protocols while providing compatibility with existing UNIX
-applications. CUPS is free software provided under the terms of the
-GNU General Public License and GNU Library General Public License.
-
-<H2>History</H2>
-
-<P>The first production release of CUPS (based on IPP/1.0) was released
-in October of 1999. Since then, we have released several patch updates
-to the original CUPS 1.0 release that addressed security, portability,
-and bugs found, but no new functionality was added to improve the
-stability of the CUPS code.
-
-<P>CUPS 1.2 is based on IPP/1.1 and adds many of the functional
-enhancements that have been requested by our users. As with 1.1, CUPS
-1.2 will be followed by patch releases that address any problems found
-with the software but add no new major features.
-
-<H2>Design Overview</H2>
-
-<P>Like most printing systems, CUPS is designed around a central print
-scheduling process that dispatches print jobs, processes administrative
-commands, provides printer status information to local and remote
-programs, and informs users as needed. Figure 1 shows the basic
-organization of CUPS.
-
-<CENTER><IMG SRC="images/cups-block-diagram.gif" WIDTH="470" HEIGHT="170"></CENTER>
-<P ALIGN="CENTER">Figure 1 - CUPS Block Diagram</P>
-
-<H3>Scheduler</H3>
-
-<P>The scheduler is a HTTP/1.1 server application that handles HTTP
-requests. Besides handling printer requests via IPP POST requests, the
-scheduler also acts as a full-featured web server for documentation,
-status monitoring, and administration.
-
-<P>The scheduler also manages a list of available printers on the LAN
-and dispatches print jobs as needed using the appropriate filters and
-backends.
-
-<H3>Configuration Files</H3>
-
-The configuration files consist of:
-
-<UL>
-
-       <LI>The HTTP server configuration file.
-
-       <LI>Printer and class definition files.
-
-       <LI>MIME type and conversion rule files.
-
-       <LI>PostScript Printer Description ("PPD") files.
-
-</UL>
-
-<P>The HTTP server configuration file is purposely similar to the
-Apache server configuration file and defines all of the access control
-properties for the server.
-
-<P>The printer and class definition files list the available printer
-queues and classes. Printer classes are collections of printers. Jobs
-sent to a class are forwarded to the first available printer in the
-class, round-robin fashion.
-
-<P>The MIME type files list the supported MIME types (text/plain,
-application/postscript, etc.) and "magic" rules for automatically
-detecting the format of a file.  These are used by the HTTP server to
-determine the <I>Content-Type</I> field for <I>GET</I> and <I>HEAD</I>
-requests and by the IPP request handler to determine the file type
-when a <I>Print-Job</I> or <I>Send-File</I> request is received with a
-<I>document-format</I> of <I>application/octet-stream</I>.
-
-<P>The MIME conversion rule files list the available filters. The
-filters are used when a job is dispatched so that an application can
-send a convenient file format to the printing system which then
-converts the document into a printable format as needed. Each filter
-has a relative cost associated with it, and the filtering algorithm
-chooses the set of filters that will convert the file to the needed
-format with the lowest total "cost".
-
-<P>The PPD files describe the capabilities of all printers, not just
-PostScript printers. There is one PPD file for each printer. PPD files
-for non-PostScript printers define additional filters through
-<I>cupsFilter</I> attributes to support printer drivers.
+<html>
+<head>
+       <meta name='Author' content='Michael Sweet'/>
+       <title>An Overview of the Common UNIX Printing System</title>
+       <link rel='stylesheet' type='text/css' href='cupsdoc.css'/>
+</head>
+<body>
+
+<table width='100%'>
+<tr valign='top'>
+       <td><img src='images/cups-large.gif' width='103'
+       height='120' alt='CUPS Logo'/></td>
+       <td><h1 align='right'>An Overview of the<br />
+       Common UNIX Printing System,<br />
+       Version 1.2</h1>
+
+       <p align='right'>July 3, 2004<br />
+       Michael Sweet, Easy Software Products<br />
+       Copyright 1998-2004, All Rights Reserved.</p>
+       </td>
+</tr>
+</table>
+
+<pre>
+New Outline:
+
+New Features:
+
+1. Networking
+   a. IPv6
+        i. Next-generation Internet support
+       ii. ????
+   b. Domain sockets
+        i. Enhanced performance under load for local clients.
+       ii. Authentication without passwords on platforms that support it.
+   c. CUPS browsing updates
+        i. "Delete" bit for printers
+       ii. "lease-time" for printers so that clients and servers don't need
+          the same browse timeout/interval settings
+      iii. Additional attributes/default options for network-wide defaults
+       iv. Network default printer
+        v. Ability to control send and receive protocols independently
+   d. Rendevous support
+   e. LDAP support
+   f. Per-printer sharing
+
+2. IPP Support
+   a. Notifications
+   b. Document object
+   c. Send-URI, Print-URI
+   d. Other stuff?
+   e. Add/delete device operations
+
+3. Scheduler
+   a. Backchannel support
+   b. Port monitor support
+   c. Device monitor
+      i. Dynamic device discovery/management
+   d. All errors include a localized message.
+   e. Fine-grain policies, server default + per-printer
+   f. UTF-8 throughout
+
+4. Web Interface
+   a. cupsd.conf interface
+   b. Move-Job
+   c. Export printers to windows
+   d. Per-printer sharing controls
+   e. Per-printer access control lists 
+   f. Policy stuff
+
+5. I18N
+   a. Support for ... character sets
+   b. All commands and messages are localized
+   c. Character set transcoding
+   d. ... , and Japanese localizations
+
+6. Drivers
+   a. New HP-RTL driver.
+
+</pre>
+
+<p>This whitepaper describes the Common UNIX Printing
+System<sup>TM</sup> (CUPS<sup>TM</sup>), a portable and
+extensible printing system for Linux<sup>&reg;</sup>,
+MacOS<sup>&reg;</sup> X, UNIX<sup>&reg;</sup>. CUPS is developed
+by <a href='http://www.easysw.com'>Easy Software Products</a>, a
+software firm located in Hollywood, Maryland that has been
+selling commercial software for UNIX since 1993 through more
+than 40 distributors serving over 80 countries worldwide.</p>
+
+<p>CUPS is used by Apple to provide printing on MacOS X and is
+the defacto-standard for Linux. Additional information on CUPS
+is available on the World Wide Web at the following URL:</p>
+
+<pre>
+    <a href='http://www.cups.org/'>http://www.cups.org/</a>
+</pre>
+
+
+<h2>Background</h2>
+
+<p>Printing within UNIX has historically been done using one of
+two printing systems - the Berkeley Line Printer Daemon (LPD)
+[RFC1179] and the AT&amp;T Line Printer system. These printing
+systems were designed in the 70's for printing text to line
+printers; vendors have since added varying levels of support for
+other types of printers.</p>
+
+<p>Replacements for these printing systems have emerged [LPRng,
+Palladin, PLP], however none of the replacements change the
+fundamental capabilities of these systems.</p>
+
+<p>Over the years several attempts at developing a standard
+printing interface have been made, including the draft POSIX
+Printing standard developed by the Institute of Electrical and
+Electronics Engineers, Inc. (IEEE) [IEEE-1387.4] and Internet
+Printing Protocol (IPP) developed by the Internet Engineering
+Task Force (IETF) through the Printer Working Group (PWG)
+[IETF-IPP]. The POSIX printing standard defines a common set of
+command-line tools as well as a C interface for printer
+administration and print jobs, but has been shelved by the
+IEEE.</p>
+
+<p>The Internet Printing Protocol defines extensions to the
+HyperText Transport Protocol 1.1 [RFC2616] to provide support
+for remote printing services. IPP/1.1 was accepted by the IETF
+as a proposed standard in ??? of ???. Unlike POSIX Printing, IPP
+enjoys widespread industry support and has become the standard
+network printing solution for all operating systems.</p>
+
+<p>CUPS uses IPP/1.1 to provide a complete, modern printing
+system for UNIX that can be extended to support new printers,
+devices, and protocols while providing compatibility with
+existing UNIX applications. CUPS is free software provided under
+the terms of the GNU General Public License and GNU Library
+General Public License.</p>
+
+<h2>History</h2>
+
+<p>The first production release of CUPS (based on IPP/1.0) was
+released in October of 1999. Version 1.1 of CUPS was released in
+August of 2002 ???? and added support for IPP/1.1.</p>
+
+<p>CUPS 1.2 is based on IPP/1.1 and adds many of the functional
+enhancements that have been requested by our users. As with CUPS
+1.1, CUPS 1.2 will be followed by patch releases that address
+any problems found with the software. New features will be put
+in the 1.3 release to follow.</p>
+
+<h2>Design Overview</h2>
+
+<p>Like most printing systems, CUPS is designed around a central
+print scheduling process that dispatches print jobs, processes
+administrative commands, provides printer status information to
+local and remote programs, and informs users as needed. Figure 1
+shows the basic organization of CUPS.</p>
+
+<p align='center'><img src='images/cups-block-diagram.gif'
+width='470' height='170' alt='CUPS Block Diagram'/><br />
+<i>Figure 1 - CUPS Block Diagram</i></p>
+
+<h3>Scheduler</h3>
+
+<p>The scheduler is a HTTP/1.1 server application that handles
+HTTP requests. Besides handling printer requests via IPP POST
+requests, the scheduler also acts as a full-featured web server
+for documentation, status monitoring, and administration.</p>
+
+<p>The scheduler also manages a list of available printers on
+the LAN and dispatches print jobs as needed using the
+appropriate filters and backends.</p>
+
+<h3>Configuration Files</h3>
+
+<p>The configuration files consist of:</p>
+
+<ul>
+
+       <li>The HTTP server configuration file.</li>
+
+       <li>Printer and class definition files.</li>
+
+       <li>MIME type and conversion rule files.</li>
+
+       <li>PostScript Printer Description (PPD) files.</li>
+
+</ul>
+
+<p>The HTTP server configuration file is purposely similar to
+the Apache server configuration file and defines all of the
+access control properties for the server.</p>
+
+<p>The printer and class definition files list the available
+printer queues and classes. Printer classes are collections of
+printers. Jobs sent to a class are forwarded to the first
+available printer in the class, round-robin fashion.</p>
+
+<p>The MIME type files list the supported MIME types
+(text/plain, application/postscript, etc.) and "magic' rules for
+automatically detecting the format of a file.  These are used by
+the HTTP server to determine the <tt>Content-Type</tt> field for
+<tt>GET</tt> and <tt>HEAD</tt> requests and by the IPP request
+handler to determine the file type when a <tt>Print-Job</tt> or
+<tt>Send-File</tt> request is received with a
+<tt>document-format</tt> of
+<tt>application/octet-stream</tt>.</p>
+
+<p>The MIME conversion rule files list the available filters.
+The filters are used when a job is dispatched so that an
+application can send a convenient file format to the printing
+system which then converts the document into a printable format
+as needed. Each filter has a relative cost associated with it,
+and the filtering algorithm chooses the set of filters that will
+convert the file to the needed format with the lowest total
+"cost".</p>
+
+<p>The PPD files describe the capabilities of all printers, not
+just PostScript printers. There is one PPD file for each
+printer. PPD files for non-PostScript printers define additional
+filters through <tt>cupsFilter</tt> attributes to support
+printer drivers.</p>
 
-<H3>CUPS API</H3>
+<h3>CUPS API</h3>
+
+<p>The CUPS API contains CUPS-specific convenience functions for
+queuing print jobs, getting printer information, accessing
+resources via HTTP and IPP, and manipulating PPD files. Unlike
+the rest of CUPS, the CUPS API is provided under the terms of
+the GNU LGPL so it may be used by non-GPL applications.</p>
 
-<P>The CUPS API contains CUPS-specific convenience functions for queuing
-print jobs, getting printer information, accessing resources via HTTP
-and IPP, and manipulating PPD files. Unlike the rest of CUPS, the CUPS
-API is provided under the terms of the GNU LGPL so it may be used by
-non-GPL applications.
+<h3>Berkeley and System V Commands</h3>
 
-<H3>Berkeley and System V Commands</H3>
+<p>CUPS provides the System V and Berkeley command-line
+interfaces for submitting jobs and checking the printer status.
+The <tt>lpstat</tt> and <tt>lpc status</tt> commands
+also show network printers ("printer@server") when printer
+browsing is enabled.</p>
 
-<P>CUPS provides the System V and Berkeley command-line interfaces for
-submitting jobs and checking the printer status. The
-<CODE>lpstat</CODE> and <CODE>lpc status</CODE> commands also show
-network printers ("printer@server") when printer browsing is enabled.
-
-<P>The System V administation commands are supplied for managing
+<p>The System V administation commands are supplied for managing
 printers and classes. The Berkeley printer administration tool
-(<CODE>lpc</CODE>) is only supported in a "read-only" mode to check the
-current status of the printer queues and scheduler.
+(<tt>lpc</tt>) is only supported in a "read-only' mode to
+check the current status of the printer queues and
+scheduler.</p>
 
-<H3>Filters</H3>
+<h3>Filters</h3>
 
-<P>A filter program reads from the standard input or from a file if a
-filename is supplied. All filters must support a common set of options
-including printer name, job ID, username, job title, number of copies,
-and job options. All output is sent to the standard output.
+<p>A filter program reads from the standard input or from a file
+if a filename is supplied. All filters must support a common set
+of options including printer name, job ID, username, job title,
+number of copies, and job options. All output is sent to the
+standard output.</p>
 
-<P>Filters are provided for many file formats and include image file
-and PostScript raster filters that support non-PostScript printers. Multiple
-filters are run in parallel to produce the required output format.
+<p>Filters are provided for many file formats and include image
+file and PostScript raster filters that support non-PostScript
+printers. Multiple filters are run in parallel to produce the
+required output format.</p>
 
-<P>The PostScript raster filter is based on the GNU Ghostscript 5.50
-core. Instead of using the Ghostscript printer drivers and front-end,
-the CUPS filter uses a generic raster printer driver and CUPS-compliant
-front-end to support any kind of raster printer. This allows the same
-printer driver filter to be used for printing raster data from any
-filter.
+<p>The PostScript raster filter is based on the ESP Ghostscript
+core. Instead of using the Ghostscript printer drivers, the CUPS
+filter uses a generic CUPS raster printer driver and
+CUPS-compliant front-end to support any kind of raster printer.
+This allows the same printer driver filter to be used for
+printing raster data from any filter.</p>
 
-<H3>CUPS Imaging</H3>
+<pre>Talk about Apple's use of CUPS...</pre>
 
-<P>The CUPS Imaging library provides functions for managing large
-images, doing colorspace conversion and color management, scaling
-images for printing, and managing raster page streams. It is used by
-the CUPS image file filters, the PostScript RIP, and all raster
-printers drivers.
+<h3>CUPS Imaging</h3>
 
-<H3>Backends</H3>
+<p>The CUPS Imaging library provides functions for managing
+large images, doing colorspace conversion and color management,
+scaling images for printing, and managing raster page streams.
+It is used by the CUPS image file filters, the PostScript RIP,
+and all raster printers drivers.</p>
 
-<P>A backend program is a special filter that sends print data to a
-device or network connection. Backends for parallel, serial, USB, LPD, IPP,
-and AppSocket (JetDirect) connections are provided in CUPS 1.2.
+<h3>Backends</h3>
 
-<P>SAMBA version 2.0.6 and higher includes a SMB backend
-(<CODE>smbspool(1)</CODE>) that can be used with CUPS 1.0 or 1.1 for
-printing to Windows.
+<p>A backend program is a special filter that sends print data
+to a device or network connection. Backends for parallel,
+serial, USB, LPD, IPP, and AppSocket (JetDirect) connections are
+provided in CUPS 1.2.</p>
 
-<H2>Network Printing</H2>
+<p>SAMBA version 2.0.6 and higher includes a SMB backend
+(<tt>smbspool(1)</tt>) that can be used for printing to
+Windows.</p>
 
-<P>Traditionally, network printing has been one of the hardest things to
-get working under UNIX. One reason is because each vendor added their
-own extensions to the LPD protocol (the previous standard for network
-printing), making cross-platform printing difficult if not impossible.
+<h2>Network Printing</h2>
 
-<P>Another reason is that you have to administer every network printer
-on every client machine. In some cases you can "clone" the printer
-configuration from a "master" client to each of the others, but even
-that can be time-consuming and error-prone. Something better is needed.
+<p>Traditionally, network printing has been one of the hardest
+things to get working under UNIX. One reason is because each
+vendor added their own extensions to the LPD protocol (the
+previous standard for network printing), making cross-platform
+printing difficult if not impossible.</p>
 
-<P>CUPS provides "printer browsing", which allows clients to
-automatically see and use printers from any server on a LAN. This means
-that you only need to configure the server and the clients will
-automatically see the printers and classes on it.
+<p>Another reason is that you have to administer every network
+printer on every client machine. In some cases you can "clone'
+the printer configuration from a "master' client to each of the
+others, but even that can be time-consuming and error-prone.
+Something better is needed.</p>
 
-<P>In addition, CUPS can automatically merge multiple identical network
-printers into "implicit classes". This allows clients to send jobs to
-the implicit class and have them print on the first available printer
-or server. In addition, failsafe and load-balancing functions are
-enabled simply by defining the same printer on multiple servers!
+<p>CUPS provides "printer browsing", which allows clients to
+automatically see and use printers from any server on a LAN.
+This means that you only need to configure the server and the
+clients will automatically see the printers and classes on
+it.</p>
 
-<H2>New Features in CUPS 1.2</H2>
+<p>In addition, CUPS can automatically merge multiple identical
+network printers into "implicit classes". This allows clients to
+send jobs to the implicit class and have them print on the first
+available printer or server. In addition, failsafe and
+load-balancing functions are enabled simply by defining the same
+printer on multiple servers!</p>
 
-<P>CUPS 1.2 includes many new features and capabilities:
+<h2>New Features in CUPS 1.2</h2>
 
-<OL>
+<p>CUPS 1.2 includes many new features and capabilities:
 
-       <LI><A HREF="#BACKENDS">Backends</A>
+<ol>
 
-       <LI><A HREF="#BANNERS">Banner Page Support</A>
+       <li><a href='#BACKENDS'>Backends</a>
 
-       <LI><A HREF="#DIGEST">Digest Authentication</A>
+       <li><a href='#BANNERS'>Banner Page Support</a>
 
-       <LI><A HREF="#DIRSVC">Directory Services</A>
+       <li><a href='#DIGEST'>Digest Authentication</a>
 
-       <LI><A HREF="#FHS2">Directory Structure Changes</A>
+       <li><a href='#DIRSVC'>Directory Services</a>
 
-       <LI><A HREF="#DOCOS">Documentation</A>
+       <li><a href='#FHS2'>Directory Structure Changes</a>
 
-       <LI><A HREF="#DRIVERS">Drivers</A>
+       <li><a href='#DOCOS'>Documentation</a>
 
-       <LI><A HREF="#FILTERS">Filters</A>
+       <li><a href='#DRIVERS'>Drivers</a>
 
-       <LI><A HREF="#IPP">IPP Support</A>
+       <li><a href='#FILTERS'>Filters</a>
 
-       <LI><A HREF="#PERSISTENCE">Job Persistence</A>
+       <li><a href='#IPP'>IPP Support</a>
 
-       <LI><A HREF="#LPD">LPD Client Support</A>
+       <li><a href='#PERSISTENCE'>Job Persistence</a>
 
-       <LI><A HREF="#USEROPTS">User-Defined Printers and Options</A>
+       <li><a href='#LPD'>LPD Client Support</a>
 
-       <LI><A HREF="#WEB">Web Administration Interface</A>
+       <li><a href='#USEROPTS'>User-Defined Printers and Options</a>
 
-</OL>
+       <li><a href='#WEB'>Web Administration Interface</a>
 
-<H3><A NAME="BACKENDS">1. Backends</A></H3>
+</ol>
 
-<P>CUPS 1.2 implements a new backend interface for retrieving a list of
-available devices for CUPS clients. This allows administration
-interfaces to query the CUPS scheduler for a list of available devices,
-automatically configure printers if the device identification
-information is available, and present the user with a list of available
-devices rather than relying on the user to know what devices are
-configured on the system.
+<h3><a name='BACKENDS'>1. Backends</a></h3>
 
-<P>The new release also includes a backend for USB printers under
-*BSD and Linux. Support for USB under Solaris 8 will be provided in
-a subsequent patch release.
+<p>CUPS 1.2 implements a new backend interface for retrieving a
+list of available devices for CUPS clients. This allows
+administration interfaces to query the CUPS scheduler for a list
+of available devices, automatically configure printers if the
+device identification information is available, and present the
+user with a list of available devices rather than relying on the
+user to know what devices are configured on the system.</p>
 
-<H3><A NAME="BANNERS">2. Banner Page Support</A></H3>
+<p>The new release also includes a backend for USB printers
+under *BSD and Linux. Support for USB under Solaris 8 will be
+provided in a subsequent patch release.</p>
 
-<P>CUPS 1.2 includes support for banner pages at the beginning and end
-of a job. Banner pages may be of any file format and support variable
-substitution for job titles, usernames, etc. Default banner pages are
-associated with each printer and can be overridden with command-line
-options by the user.
+<h3><a name='BANNERS'>2. Banner Page Support</a></h3>
 
-<H3><A NAME="DIGEST">3. Digest Authentication</A></H3>
+<p>CUPS 1.2 includes support for banner pages at the beginning
+and end of a job. Banner pages may be of any file format and
+support variable substitution for job titles, usernames, etc.
+Default banner pages are associated with each printer and can be
+overridden with command-line options by the user.</p>
 
-<P>Digest authentication provides a more secure method of authenticating
-access to the printing system. Unlike Basic authentication, Digest
-authentication does not send passwords "in the clear" so it is more
-difficult to gain unauthorized access to your system.
+<h3><a name='DIGEST'>3. Digest Authentication</a></h3>
 
-<P>CUPS 1.2 implements Digest authentication using a special MD5
-password file instead of the UNIX password file. This file is managed
-using the new <CODE>lppasswd</CODE> command.
+<p>Digest authentication provides a more secure method of
+authenticating access to the printing system. Unlike Basic
+authentication, Digest authentication does not send passwords
+"in the clear' so it is more difficult to gain unauthorized
+access to your system.</p>
 
-<H3><A NAME="DIRSVC">4. Directory Services</A></H3>
+<p>CUPS 1.2 implements Digest authentication using a special MD5
+password file instead of the UNIX password file. This file is
+managed using the new <tt>lppasswd</tt> command.</p>
 
-<P>CUPS 1.2 adds new directory service ("printer browsing") features to
-make using CUPS on large LANs and WANs easier. You can now poll a
-remote server for printer information and relay it to the LAN as well
-as restrict what printer information is processed (e.g. to "hide"
-servers, domains, or networks that you don't want to see.)
+<h3><a name='DIRSVC'>4. Directory Services</a></h3>
 
-<H3><A NAME="FHS2">5. Directory Structure Changes</A></H3>
+<p>CUPS 1.2 adds new directory service ("printer browsing")
+features to make using CUPS on large LANs and WANs easier. You
+can now poll a remote server for printer information and relay
+it to the LAN as well as restrict what printer information is
+processed (e.g. to "hide" servers, domains, or networks that you
+don't want to see.)</p>
 
-<P>CUPS 1.2 now uses a directory structure that complies with the
-Filesystem Hierarchy Standard ("FHS"), version 2.0. This should make
-integration into existing Linux and *BSD distributions a lot easier.
+<h3><a name='FHS2'>5. Directory Structure Changes</a></h3>
 
-<H3><A NAME="DOCOS">6. Documentation</A></H3>
+<p>CUPS 1.2 now uses a directory structure that complies with
+the Filesystem Hierarchy Standard (FHS), version 2.0. This
+should make integration into existing Linux and *BSD
+distributions a lot easier.</p>
 
-<P>The CUPS 1.2 documentation has gone through many revisions,
-including a completely rewritten administrators manual, a new
-programmers manual, and an IPP implementation reference manual.
+<h3><a name='DOCOS'>6. Documentation</a></h3>
 
-<H3><A NAME="DRIVERS">7. Drivers</A></H3>
+<p>The CUPS 1.2 documentation has gone through many revisions,
+including a completely rewritten administrators manual, a new
+programmers manual, and an IPP implementation reference
+manual.</p>
 
-<P>CUPS 1.2 includes drivers for EPSON dot-matrix and inkjet printers.
-As with the HP PCL drivers, the EPSON drivers don't necessarily provide
-the best possible output for each printer but should provide adequate
-printing quality for general day-to-day printing.
+<h3><a name='DRIVERS'>7. Drivers</a></h3>
 
-<H3><A NAME="FILTERS">8. Filters</A></H3>
+<p>CUPS 1.2 includes drivers for EPSON dot-matrix and inkjet
+printers. As with the HP PCL drivers, the EPSON drivers don't
+necessarily provide the best possible output for each printer
+but should provide adequate printing quality for general
+day-to-day printing.</p>
 
-<P>CUPS 1.2 includes new image, PostScript, PDF, and text filters. The image
-filters have been upgraded to support Windows BMP and Alias PIX files.
+<h3><a name='FILTERS'>8. Filters</a></h3>
 
-<P>The PostScript filter is now based off GNU Ghostscript 5.50. The new
-filter provides much better performance with higher-resolution printers
-and supports most Level 3 PostScript language features.
+<p>CUPS 1.2 includes new image, PostScript, PDF, and text
+filters. The image filters have been upgraded to support Windows
+BMP and Alias PIX files.</p>
 
-<P>The new PDF filter is based off the excellent Xpdf software from
-Derek Noonburg and supports automatic page scaling. The new filter is a
-faster, smaller, more reliable replacement for the GNU Ghostscript PDF
-filtering that was used in CUPS 1.0.
+<p>The PostScript filter is now based off ESP Ghostscript. The
+new filter provides much better performance with
+higher-resolution printers and supports all Level 3 PostScript
+language features.</p>
 
-<P>The new text filter now supports bidirectional text and can embed
-fonts as needed.
+<p>The new PDF filter is based off the excellent Xpdf software
+from Derek Noonburg and supports automatic page scaling. The new
+filter is a faster, smaller, more reliable replacement for the
+GNU Ghostscript PDF filtering that was used in CUPS 1.0.</p>
 
-<H3><A NAME="IPP">9. IPP Support</A></H3>
+<p>The new text filter now supports bidirectional text and can
+embed fonts as needed.</p>
 
-<P>Probably the least visible portion of CUPS is the IPP support. CUPS
-1.1 implements all of the required IPP/1.1 operations and attributes
-and most of the optional ones. The optional Create-Job and Send-File
-operations are now implemented, allowing for better System V printing
-system compatibility (one job ID per <CODE>lp</CODE> command) and
-support for banner pages.
+<h3><a name='IPP'>9. IPP Support</a></h3>
+
+<p>Probably the least visible portion of CUPS is the IPP
+support. CUPS 1.1 implements all of the required IPP/1.1
+operations and attributes and most of the optional ones. The
+optional Create-Job and Send-File operations are now
+implemented, allowing for better System V printing system
+compatibility (one job ID per <tt>lp</tt> command) and support
+for banner pages.</p>
 
-<H3><A NAME="PERSISTENCE">10. Job Persistence</A></H3>
+<h3><a name='PERSISTENCE'>10. Job Persistence</a></h3>
 
-<P>CUPS 1.2 supports job persistence. This means that jobs are preserved
-even after a reboot, a feature that was sorely missing from CUPS 1.0.
+<p>CUPS 1.2 supports job persistence. This means that jobs are
+preserved even after a reboot, a feature that was sorely missing
+from CUPS 1.0.</p>
 
-<P>In addition, CUPS 1.2 allows you to keep job information after the
-job has printed. The basic post-job persistence mode provides a job
-history (number of pages printed, time job was printed, etc.) but does
-not preserve the actual job files. This can be changed to discard all
-information after a job is printed or keep the job files after printing
-so you can reprint a job at some later time.
+<p>In addition, CUPS 1.2 allows you to keep job information
+after the job has printed. The basic post-job persistence mode
+provides a job history (number of pages printed, time job was
+printed, etc.) but does not preserve the actual job files. This
+can be changed to discard all information after a job is printed
+or keep the job files after printing so you can reprint a job at
+some later time.</p>
 
-<H3><A NAME="LPD">11. LPD Client Support</A></H3>
+<h3><a name='LPD'>11. LPD Client Support</a></h3>
 
-<P>By popular request, CUPS 1.2 supports LPD-based clients using a new
-mini-daemon that handles LPD requests and passes them on to the main
-server.
+<p>By popular request, CUPS 1.2 supports LPD-based clients using
+a new mini-daemon that handles LPD requests and passes them on
+to the main server.</p>
 
-<H3><A NAME="USEROPTS">12. User-Defined Printers and Options</A></H3>
+<h3><a name='USEROPTS'>12. User-Defined Printers and Options</a></h3>
 
-<P>CUPS 1.2 includes support for user-defined printers and options via
-a new <CODE>lpoptions</CODE> command. User-defined printers are special
-instances of the available printers (e.g. "printer/instance" or
-"printer@server/instance") that can have their own default options such
-as media size, resolution, and so forth. The <CODE>lpoptions</CODE>
-command can also be used to set a different default printer queue.
+<p>CUPS 1.2 includes support for user-defined printers and
+options via a new <tt>lpoptions</tt> command. User-defined
+printers are special instances of the available printers (e.g.
+"printer/instance" or "printer@server/instance") that can have
+their own default options such as media size, resolution, and so
+forth. The <tt>lpoptions</tt> command can also be used to set a
+different default printer queue.</p>
 
-<H3><A NAME="WEB">13. Web Administration Interface</A></H3>
+<h3><a name='WEB'>13. Web Administration Interface</a></h3>
 
-<P>CUPS 1.0 provided a simple class, job, and printer monitoring
-interface for web browsers. CUPS 1.2 replaces this interface with an
-enhanced administration interface that allows you to add, modify,
-delete, configure, and control classes, jobs, and printers.
+<p>CUPS 1.0 provided a simple class, job, and printer monitoring
+interface for web browsers. CUPS 1.2 replaces this interface
+with an enhanced administration interface that allows you to
+add, modify, delete, configure, and control classes, jobs, and
+printers.</p>
 
-<H2>Software Using CUPS</H2>
+<h2>Software Using CUPS</h2>
 
-<P>A lot has happened since CUPS 1.0 came out, and many software packages
-are supporting CUPS. We have contributed code to the SAMBA team to support
-CUPS, and parts of that are already available in SAMBA 2.0.6 and 2.0.7.
-With any luck the final pieces that provide a complete integration with
-SAMBA will be available in the next release of SAMBA.
+<p>A lot has happened since CUPS 1.0 came out, and many software
+packages are supporting CUPS. We have contributed code to the
+SAMBA team to support CUPS, and parts of that are already
+available in SAMBA 2.0.6 and 2.0.7. With any luck the final
+pieces that provide a complete integration with SAMBA will be
+available in the next release of SAMBA.</p>
 
-<P>Two graphical interfaces have appeared on the scene that use CUPS as
-well. The KUPS project provides a KDE-based interface for CUPS and can be
-found at:
+<p>Two graphical interfaces have appeared on the scene that use
+CUPS as well. The KUPS project provides a KDE-based interface
+for CUPS and can be found at:</p>
 
-<UL><PRE>
-<A HREF="http://kups.sourceforge.net">http://kups.sourceforge.net</A>
-</PRE></UL>
+<pre>
+    <a href='http://kups.sourceforge.net'>http://kups.sourceforge.net</a>
+</pre>
 
-<P>The X Printing Panel ("XPP") project provides a graphical printing
-panel for CUPS and can be found at:
+<p>The X Printing Panel (XPP) project provides a graphical
+printing panel for CUPS and can be found at:</p>
 
-<UL><PRE>
-<A HREF="http://www.phy.uni-bayreuth.de/till/xpp">http://www.phy.uni-bayreuth.de/till/xpp/</A>
-</PRE></UL>
+<pre>
+    <a href='http://www.phy.uni-bayreuth.de/till/xpp'>http://www.phy.uni-bayreuth.de/till/xpp/</a>
+</pre>
 
-<P>Numerous other filters, drivers, tutorials, etc. have been made available
-on the CUPS Links web page, available at:
+<p>Numerous other filters, drivers, tutorials, etc. have been
+made available on the CUPS Links web page, available at:</p>
 
-<UL><PRE>
-<A HREF="http://www.cups.org/links.php">http://www.cups.org/links.php</A>
-</PRE></UL>
+<pre>
+    <a href='http://www.cups.org/links.php'>http://www.cups.org/links.php</a>
+</pre>
 
-<P>Finally, our own ESP Print Pro software uses CUPS to provide drivers
-for thousands of printers and can be found at:
+<p>Finally, our own ESP Print Pro software uses CUPS to provide
+drivers for thousands of printers and can be found at:</p>
 
-<UL><PRE>
-<A HREF="http://www.easysw.com/printpro">http://www.easysw.com/printpro</A>
-</PRE></UL>
+<pre>
+    <a href='http://www.easysw.com/printpro'>http://www.easysw.com/printpro</a>
+</pre>
 
-<H2>Operating Systems Using CUPS</H2>
+<h2>Operating Systems Using CUPS</h2>
 
-<P>One of our goals has always been to get as many UNIX/Linux
-distributions using CUPS as possible. Debian is currently providing
-CUPS as part of its stable distribution, and many other distributions
-are considering it in their next releases.
+<p>One of our goals has always been to get as many UNIX/Linux
+distributions using CUPS as possible. Debian is currently
+providing CUPS as part of its stable distribution, and many
+other distributions are considering it in their next
+releases.</p>
 
-<H2>Summary</H2>
+<h2>Summary</h2>
 
-<P>The Common UNIX Printing System provides a modern printing interface
-for UNIX applications that is both flexible and user-friendly. The
-software provides System V and Berkeley compatible command-line
-interfaces to ensure compatibility with existing applications. CUPS 1.2
-adds many new features that make it an even better choice for printing
-under UNIX.
+<p>The Common UNIX Printing System provides a modern printing
+interface for UNIX applications that is both flexible and
+user-friendly. The software provides System V and Berkeley
+compatible command-line interfaces to ensure compatibility with
+existing applications. CUPS 1.2 adds many new features that make
+it an even better choice for printing under UNIX.</p>
 
-<H2>Who to Contact</H2>
+<h2>Who to Contact</h2>
 
-<P>For more information on CUPS please contact us at:
+<p>For more information on CUPS please contact us at:
 
-<UL><PRE>
-Attn: CUPS Information
-Easy Software Products
-44141 Airport View Drive Suite 204
-Hollywood, Maryland 20636-3111 USA
+<pre>
+    Attn: CUPS Information
+    Easy Software Products
+    44141 Airport View Drive Suite 204
+    Hollywood, Maryland 20636-3142 USA
 
-+1.301.373.9600
+    +1.301.373.9600
 
-<A HREF="mailto:cups-info@cups.org">cups-info@cups.org</A>
-</PRE></UL>
+    <a href='mailto:cups-info@cups.org'>cups-info@cups.org</a>
+</pre>
 
-<H2>References</H2>
+<h2>References</h2>
 
-<DL>
+<dl>
 
-       <DT>IEEE-1387.4</DT>
+       <dt>IEEE-1387.4</dt>
 
-       <DD>System Administration - Part 4: Printing Interfaces (draft)</DD>
+       <dd>System Administration - Part 4: Printing Interfaces
+       (draft)</dd>
 
-       <DT><A HREF="http://www.pwg.org/ipp/index.html">IETF-IPP</A></DT>
+       <dt><a href='http://www.pwg.org/ipp/index.html'>IETF-IPP</a></dt>
 
-       <DD>Internet Printing Protocol/1.1</DD>
+       <dd>Internet Printing Protocol/1.1</dd>
 
-       <DT><A HREF="http://www.astart.com/lprng.html">LPRng</A></DT>
+       <dt><a href='http://www.astart.com/lprng.html'>LPRng</a></dt>
 
-       <DD>An enhanced, extended, and portable implementation of the
-       Berkeley LPR print spooler functionality</DD>
+       <dd>An enhanced, extended, and portable implementation
+       of the Berkeley LPR print spooler functionality</dd>
 
-       <DT>Palladin</DT>
+       <dt>Palladin</dt>
 
-       <DD>A printing system developed at the Massachussetts Institute
-       of Technology</DD>
+       <dd>A printing system developed at the Massachussetts
+       Institute of Technology</dd>
 
-       <DT><A HREF="http://www-usa.iona.com//hyplan/jmason/plp.html">PLP</A></DT>
+       <dt><a href='http://www-usa.iona.com//hyplan/jmason/plp.html'>PLP</a></dt>
 
-       <DD>The Portable Line Printer spooler system</DD>
+       <dd>The Portable Line Printer spooler system</dd>
 
-       <DT><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC1179</A></DT>
+       <dt><a href='http://www.ietf.org/rfc/rfc1179.txt'>RFC1179</a></dt>
 
-       <DD>Line Printer Daemon Protocol</DD>
+       <dd>Line Printer Daemon Protocol</dd>
 
-       <DT><A HREF="http://www.ietf.org/rfc/rfc2046.txt">RFC2046</A></DT>
+       <dt><a href='http://www.ietf.org/rfc/rfc2046.txt'>RFC2046</a></dt>
 
-       <DD>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</DD>
+       <dd>Multipurpose Internet Mail Extensions (MIME) Part
+       Two: Media Types</dd>
 
-       <DT><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</A></DT>
+       <dt><a href='http://www.ietf.org/rfc/rfc2616.txt'>RFC2616</a></dt>
 
-       <DD>Hypertext Transfer Protocol -- HTTP/1.1</DD>
+       <dd>Hypertext Transfer Protocol -- HTTP/1.1</dd>
 
-</DL>
+</dl>
 
-<H2>Trademarks</H2>
+<h2>Trademarks</h2>
 
-<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
-trademark property of Easy Software Products. All other trademarks are
-the property of their respective owners.
+<p>The Common UNIX Printing System, CUPS, and the CUPS logo are
+the trademark property of Easy Software Products. All other
+trademarks are the property of their respective owners.</p>
 
-</BODY>
-</HTML>
+</body>
+</html>
index 5325014bf8396f9729982c9f75bddae317dd6d78..8fadb2364da2d51d71330a7632e6f70e7c3eeff8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-polld.c,v 1.5.2.20 2004/06/29 13:15:10 mike Exp $"
+ * "$Id: cups-polld.c,v 1.5.2.21 2004/07/06 00:35:31 mike Exp $"
  *
  *   Polling daemon for the Common UNIX Printing System (CUPS).
  *
@@ -23,7 +23,7 @@
  *
  * Contents:
  *
- *   main()        - Open socks and poll until we are killed...
+ *   main()        - Open sockets and poll until we are killed...
  *   poll_server() - Poll the server for the given set of printers or classes.
  */
 
@@ -48,7 +48,7 @@ int   poll_server(http_t *http, cups_lang_t *language, ipp_op_t op,
 
 
 /*
- * 'main()' - Open socks and poll until we are killed...
+ * 'main()' - Open sockets and poll until we are killed...
  */
 
 int                                    /* O - Exit status */
@@ -407,5 +407,5 @@ poll_server(http_t      *http,              /* I - HTTP connection */
 
 
 /*
- * End of "$Id: cups-polld.c,v 1.5.2.20 2004/06/29 13:15:10 mike Exp $".
+ * End of "$Id: cups-polld.c,v 1.5.2.21 2004/07/06 00:35:31 mike Exp $".
  */
index f712b39b002db3a559f3ec68dbc03577634006dd..9d2e850cec3757ac01fc96de472aba31704e7151 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testspeed.c,v 1.3.2.6 2004/06/29 13:15:11 mike Exp $"
+ * "$Id: testspeed.c,v 1.3.2.7 2004/07/06 00:35:31 mike Exp $"
  *
  *   Scheduler speed test for the Common UNIX Printing System (CUPS).
  *
@@ -116,35 +116,42 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
   start = time(NULL);
 
-  for (i = 0; i < children; i ++)
-    if ((pid = fork()) == 0)
-    {
-     /*
-      * Child goes here...
-      */
-
-      exit(do_test(server, encryption, requests));
-    }
-    else if (pid < 0)
-    {
-      perror("fork failed");
-      break;
-    }
-    else
-      printf("testspeed(%d): Started...\n", pid);
+  if (children == 1)
+  {
+    do_test(server, encryption, requests);
+  }
+  else
+  {
+    for (i = 0; i < children; i ++)
+      if ((pid = fork()) == 0)
+      {
+       /*
+       * Child goes here...
+       */
+
+       exit(do_test(server, encryption, requests));
+      }
+      else if (pid < 0)
+      {
+       perror("fork failed");
+       break;
+      }
+      else
+       printf("testspeed(%d): Started...\n", pid);
 
- /*
-  * Wait for children to finish...
-  */
  /*
+    * Wait for children to finish...
+    */
 
-  for (;;)
-  {
-    pid = wait(&status);
+    for (;;)
+    {
+      pid = wait(&status);
 
-    if (pid < 0 && errno != EINTR)
-      break;
+      if (pid < 0 && errno != EINTR)
+       break;
 
-    printf("testspeed(%d): Ended (%d)...\n", pid, status);
+      printf("testspeed(%d): Ended (%d)...\n", pid, status);
+    }
   }
 
  /*
@@ -288,5 +295,5 @@ usage(void)
 
 
 /*
- * End of "$Id: testspeed.c,v 1.3.2.6 2004/06/29 13:15:11 mike Exp $".
+ * End of "$Id: testspeed.c,v 1.3.2.7 2004/07/06 00:35:31 mike Exp $".
  */