1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4  <head>
5    <meta name="generator" content="HTML Tidy, see www.w3.org">
6    <title>Filter Exit Codes</title>
7    <meta name="GENERATOR" content=
8    "Modular DocBook HTML Stylesheet Version 1.7">
9    <link rel="HOME" title=" LPRng Reference Manual" href=
10    "index.htm">
11    <link rel="UP" title="Filters " href="filters.htm">
12    <link rel="PREVIOUS" title="Filters " href="filters.htm">
13    <link rel="NEXT" title="Print Job Formats " href=
14    "printjobformats.htm">
15  </head>
16
17  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
18  "#0000FF" vlink="#840084" alink="#0000FF">
19    <div class="NAVHEADER">
20      <table summary="Header navigation table" width="100%" border=
21      "0" cellpadding="0" cellspacing="0">
22        <tr>
23          <th colspan="3" align="center">LPRng Reference Manual: 5
24          Sep 2003 (For LPRng-3.8.22)</th>
25        </tr>
26
27        <tr>
28          <td width="10%" align="left" valign="bottom"><a href=
29          "filters.htm" accesskey="P">Prev</a></td>
30
31          <td width="80%" align="center" valign="bottom">Chapter
32          16. Filters</td>
33
34          <td width="10%" align="right" valign="bottom"><a href=
35          "printjobformats.htm" accesskey="N">Next</a></td>
36        </tr>
37      </table>
38      <hr align="LEFT" width="100%">
39    </div>
40
41    <div class="SECT1">
42      <h1 class="SECT1"><a name="EXITCODES">16.2. Filter Exit
43      Codes</a></h1>
44
45      <p>When a filter exits, the exit code value is used by the
46      parent process to determine what actions to take. Since
47      filters are used in several places in the printing process,
48      not just to do format conversion, there is a large number of
49      recognized exit values.</p>
50
51      <div class="INFORMALEXAMPLE">
52        <a name="AEN7780"></a>
53<pre class="SCREEN">
54    Key      Value   Meaning
55    JSUCC    0       Successful
56    JFAIL    1, 32   Failed - retry later
57    JABORT   2, 33   Abort - terminate queue processing
58    JREMOVE  3, 34   Failed - remove job
59    (Unused) 4, 35   (Unused)
60    (Unused) 5, 36   (Unused)
61    JHOLD    6, 37   Hold this job - reprint later
62    JNOSPOOL 7, 38   No spooling to this queue
63    JNOPRINT 8, 39   No printing from this queue
64    JSIGNAL  9,  40   Killed by unrecognized signal
65    JFAILNORETRY 10, 41 Failed, no retry
66    Other            Abort - terminate queue processing
67</pre>
68      </div>
69      <br>
70      <br>
71
72      <div class="SECT2">
73        <h2 class="SECT2"><a name="JSUCC">16.2.1. JSUCC</a></h2>
74
75        <p>A zero or <acronym class="ACRONYM">JSUCC</acronym> exit
76        value always indicates success; a non-zero exit value
77        indicates failure or a problem condition and requires
78        special handling by the parent process.</p>
79      </div>
80
81      <div class="SECT2">
82        <h2 class="SECT2"><a name="JFAIL">16.2.2. JFAIL</a></h2>
83
84        <p>When printing or performing some action that can be
85        repeated, such as connecting to a remote printer, a 1 or
86        <acronym class="ACRONYM">JFAIL</acronym> status indicates a
87        transient failure condition. Depending on various
88        configuration options, the printing or other operation can
89        be retried.</p>
90      </div>
91
92      <div class="SECT2">
93        <h2 class="SECT2"><a name="JABORT">16.2.3. JABORT</a></h2>
94
95        <p>The 2 or <acronym class="ACRONYM">JABORT</acronym> is a
96        more serious error, and indicates that there is no
97        expectation that the operation would succeed if retried. It
98        may also indicate that no other similar operation should be
99        performed. Jobs whose print filters exit with <acronym
100        class="ACRONYM">JABORT</acronym> are usually unprintable,
101        and by default are removed from the print queue.</p>
102      </div>
103
104      <div class="SECT2">
105        <h2 class="SECT2"><a name="JREMOVE">16.2.4.
106        JREMOVE</a></h2>
107
108        <p>The <acronym class="ACRONYM">JREMOVE</acronym> status
109        indicates that the job should be removed from the print
110        queue. This is a refinement of the <acronym class=
111        "ACRONYM">JFAIL</acronym> and <acronym class=
112        "ACRONYM">JABORT</acronym> status. The job is usually
113        unconditionally removed from the print queue, even if it is
114        normally kept in the queue for reprinting. This status is
115        usually returned by filters which are responsible for
116        permission checking and is returned when the user has no
117        permission to print.</p>
118      </div>
119
120      <div class="SECT2">
121        <h2 class="SECT2"><a name="JHOLD">16.2.5. JHOLD</a></h2>
122
123        <p>The <acronym class="ACRONYM">JREMOVE</acronym> status
124        indicates that the job should be held and reprinted at a
125        later time. This status is returned by various filters
126        during the processing of a job, and usually indicates that
127        the resources needed for a job are not available. Held jobs
128        need to be explicitly released by the administrator.</p>
129      </div>
130
131      <div class="SECT2">
132        <h2 class="SECT2"><a name="JNOSPOOL">16.2.6. JNOSPOOL and
133        JNOPRINT</a></h2>
134
135        <p>The <acronym class="ACRONYM">JNOSPOOL</acronym> and
136        <acronym class="ACRONYM">JNOPRINT</acronym> are used as
137        part of the management of load balancing queues and the
138        <span class="emphasis"><i class="EMPHASIS">check
139        idle</i></span> filter. <b class="APPLICATION">LPRng</b>
140        has the ability to run a program to check to see if a spool
141        queue is available for printing on a dynamic basis. If the
142        filter that does this checking exits with <acronym class=
143        "ACRONYM">JNOSPOOL</acronym> or <acronym class=
144        "ACRONYM">JNOPRINT</acronym> then jobs should not be sent
145        to the spool queue.</p>
146      </div>
147
148      <div class="SECT2">
149        <h2 class="SECT2"><a name="JSIGNAL">16.2.7.
150        JSIGNAL</a></h2>
151
152        <p>This status is usually returned when the exiting process
153        is terminated by a signal or abort, and does not exit using
154        the <var class="LITERAL">exit</var> facility. It is usually
155        handled like a <acronym class="ACRONYM">JABORT</acronym>
156        exit status, and is the indication of a severe and possibly
157        non-restartable system failure.</p>
158      </div>
159
160      <div class="SECT2">
161        <h2 class="SECT2"><a name="JNORETRY">16.2.8.
162        JFAILNORETRY</a></h2>
163
164        <p>This code is used under an extremely odd set of
165        circumstances and was used to support a sophisticated print
166        retry system.</p>
167
168        <p>Normally when a print filter or other filter returns
169        this code, it is treated as <acronym class=
170        "ACRONYM">JFAIL</acronym>. The job is marked as having an
171        error condition and is not <var class=
172        "LITERAL">immediately</var> retried. Other jobs can then be
173        tried for printing in the queue. It is not removed from the
174        print queue, but marked as <var class=
175        "LITERAL">unprintable</var>.</p>
176
177        <p>When a <span class="emphasis"><i class=
178        "EMPHASIS">round-robin retry</i></span> print scheduling
179        algorithm is used, if there are no other jobs available for
180        printing then the jobs that failed with <acronym class=
181        "ACRONYM">JFAILNORETRY</acronym> are retried. Thus, jobs
182        that are submitted go to the head of the queue for
183        printing, and jobs that are pending for repeat are printed
184        after them. This algorithm is deprecated, and that the
185        details of this algorithm are undocumented.</p>
186      </div>
187
188      <div class="SECT2">
189        <h2 class="SECT2"><a name="JOTHER">16.2.9. Other
190        Values</a></h2>
191
192        <p>If a filter exits with other than the indicated value,
193        or a value inappropriate for its purpose, then the result
194        is treated like <acronym class=
195        "ACRONYM">JABORT</acronym>.</p>
196      </div>
197    </div>
198
199    <div class="NAVFOOTER">
200      <hr align="LEFT" width="100%">
201
202      <table summary="Footer navigation table" width="100%" border=
203      "0" cellpadding="0" cellspacing="0">
204        <tr>
205          <td width="33%" align="left" valign="top"><a href=
206          "filters.htm" accesskey="P">Prev</a></td>
207
208          <td width="34%" align="center" valign="top"><a href=
209          "index.htm" accesskey="H">Home</a></td>
210
211          <td width="33%" align="right" valign="top"><a href=
212          "printjobformats.htm" accesskey="N">Next</a></td>
213        </tr>
214
215        <tr>
216          <td width="33%" align="left" valign="top">Filters</td>
217
218          <td width="34%" align="center" valign="top"><a href=
219          "filters.htm" accesskey="U">Up</a></td>
220
221          <td width="33%" align="right" valign="top">Print Job
222          Formats</td>
223        </tr>
224      </table>
225    </div>
226  </body>
227</html>
228
229