]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - doc/help/api-filter.html
Merge changes from CUPS 1.5svn-r9763.
[thirdparty/cups.git] / doc / help / api-filter.html
index 904926fe246dc704c94910ccea4d4f34ed3eb9cd..e66df8daf2cab8a1cb32379ee576729c21877a0f 100644 (file)
@@ -484,7 +484,7 @@ more detail.</p>
 <h3><a name="SECURITY">Security Considerations</a></h3>
 
 <p>It is always important to use security programming practices. Filters and
-most backends are run as a non-priviledged user, so the major security
+most backends are run as a non-privileged user, so the major security
 consideration is resource utilization - filters should not depend on unlimited
 amounts of CPU, memory, or disk space, and should protect against conditions
 that could lead to excess usage of any resource like infinite loops and
@@ -519,6 +519,22 @@ held. Filters, backends, and port monitors <em>must</em> catch
 file or return the printer to a known good state. The recommended behavior is to
 end the output on the current page.</p>
 
+<p>Filters and backends may also receive <code>SIGPIPE</code> when an upstream or downstream filter/backend exits with a non-zero status. Developers should generally <code>ignore SIGPIPE</code> at the beginning of <code>main()</code> with the following function call:</p>
+
+<pre class="example">
+#include &lt;signal.h&gt;>
+
+...
+
+int
+main(int argc, char *argv[])
+{
+  signal(SIGPIPE, SIG_IGN);
+
+  ...
+}
+</pre>
+
 <h3><a name="PERMISSIONS">File Permissions</a></h3>
 
 <p>For security reasons, CUPS will only run filters and backends that are owned