summaryrefslogtreecommitdiff
path: root/cups/api-filter.shtml
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-05-11 05:36:13 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-05-11 05:36:13 +0000
commiteac3a0a01bf37d95f4129b28296cb697c54b2613 (patch)
treea209bfa09edda04d8a339b869b4d5ce3057d8bbe /cups/api-filter.shtml
parent22c9029b44a790ba1ee894027431dcea1ec2aeab (diff)
downloadcups-eac3a0a01bf37d95f4129b28296cb697c54b2613.tar.gz
Merge changes from CUPS 1.5svn-r9763.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3242 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/api-filter.shtml')
-rw-r--r--cups/api-filter.shtml18
1 files changed, 17 insertions, 1 deletions
diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml
index e44c7063a..2e149f11f 100644
--- a/cups/api-filter.shtml
+++ b/cups/api-filter.shtml
@@ -57,7 +57,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
@@ -92,6 +92,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