File: exitcodes.htm

package info (click to toggle)
lprng 3.8.10-1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 13,076 kB
  • ctags: 4,348
  • sloc: ansic: 35,394; sh: 10,756; perl: 2,210; makefile: 1,046
file content (223 lines) | stat: -rw-r--r-- 8,643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Filter Exit Codes</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.71 ">
    <link rel="HOME" title=" LPRng-HOWTO" href="index.htm">
    <link rel="UP" title="Filters " href="filters.htm">
    <link rel="PREVIOUS" title="Filters " href="filters.htm">
    <link rel="NEXT" title="Print Job Formats " href=
    "printjobformats.htm">
  </head>

  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table summary="Header navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <th colspan="3" align="center">LPRng-HOWTO: 1 Apr 2002
          (For LPRng-3.8.10)</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href=
          "filters.htm" accesskey="P">Prev</a></td>

          <td width="80%" align="center" valign="bottom">Chapter
          16. Filters</td>

          <td width="10%" align="right" valign="bottom"><a href=
          "printjobformats.htm" accesskey="N">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="SECT1">
      <h1 class="SECT1"><a name="EXITCODES">16.2. Filter Exit
      Codes</a></h1>

      <p>When a filter exits, the exit code value is used by the
      parent process to determine what actions to take. Since
      filters are used in several places in the printing process,
      not just to do format conversion, there is a large number of
      recognized exit values.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN7662"></a>
<pre class="SCREEN">
    Key      Value   Meaning
    JSUCC    0       Successful
    JFAIL    1, 32   Failed - retry later
    JABORT   2, 33   Abort - terminate queue processing
    JREMOVE  3, 34   Failed - remove job
    (Unused) 4, 35   (Unused)
    (Unused) 5, 36   (Unused)
    JHOLD    6, 37   Hold this job - reprint later
    JNOSPOOL 7, 38   No spooling to this queue
    JNOPRINT 8, 39   No printing from this queue
    JSIGNAL  9,  40   Killed by unrecognized signal
    JFAILNORETRY 10, 41 Failed, no retry
    Other            Abort - terminate queue processing
</pre>
      </div>
      <br>
      <br>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JSUCC">16.2.1. JSUCC</a></h2>

        <p>A zero or <span class="ACRONYM">JSUCC</span> exit value
        always indicates success; a non-zero exit value indicates
        failure or a problem condition and requires special
        handling by the parent process.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JFAIL">16.2.2. JFAIL</a></h2>

        <p>When printing or performing some action that can be
        repeated, such as connecting to a remote printer, a 1 or
        <span class="ACRONYM">JFAIL</span> status indicates a
        transient failure condition. Depending on various
        configuration options, the printing or other operation can
        be retried.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JABORT">16.2.3. JABORT</a></h2>

        <p>The 2 or <span class="ACRONYM">JABORT</span> is a more
        serious error, and indicates that there is no expectation
        that the operation would succeed if retried. It may also
        indicate that no other similar operation should be
        performed. Jobs whose print filters exit with <span class=
        "ACRONYM">JABORT</span> are usually unprintable, and by
        default are removed from the print queue.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JREMOVE">16.2.4.
        JREMOVE</a></h2>

        <p>The <span class="ACRONYM">JREMOVE</span> status
        indicates that the job should be removed from the print
        queue. This is a refinement of the <span class=
        "ACRONYM">JFAIL</span> and <span class=
        "ACRONYM">JABORT</span> status. The job is usually
        unconditionally removed from the print queue, even if it is
        normally kept in the queue for reprinting. This status is
        usually returned by filters which are responsible for
        permission checking and is returned when the user has no
        permission to print.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JHOLD">16.2.5. JHOLD</a></h2>

        <p>The <span class="ACRONYM">JREMOVE</span> status
        indicates that the job should be held and reprinted at a
        later time. This status is returned by various filters
        during the processing of a job, and usually indicates that
        the resources needed for a job are not available. Held jobs
        need to be explicitly released by the administrator.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JNOSPOOL">16.2.6. JNOSPOOL and
        JNOPRINT</a></h2>

        <p>The <span class="ACRONYM">JNOSPOOL</span> and <span
        class="ACRONYM">JNOPRINT</span> are used as part of the
        management of load balancing queues and the <i class=
        "EMPHASIS">check idle</i> filter. <b class=
        "APPLICATION">LPRng</b> has the ability to run a program to
        check to see if a spool queue is available for printing on
        a dynamic basis. If the filter that does this checking
        exits with <span class="ACRONYM">JNOSPOOL</span> or <span
        class="ACRONYM">JNOPRINT</span> then jobs should not be
        sent to the spool queue.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JSIGNAL">16.2.7.
        JSIGNAL</a></h2>

        <p>This status is usually returned when the exiting process
        is terminated by a signal or abort, and does not exit using
        the <tt class="LITERAL">exit</tt> facility. It is usually
        handled like a <span class="ACRONYM">JABORT</span> exit
        status, and is the indication of a severe and possibly
        non-restartable system failure.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JNORETRY">16.2.8.
        JFAILNORETRY</a></h2>

        <p>This code is used under an extremely odd set of
        circumstances and was used to support a sophisticated print
        retry system.</p>

        <p>Normally when a print filter or other filter returns
        this code, it is treated as <span class=
        "ACRONYM">JFAIL</span>. The job is marked as having an
        error condition and is not <tt class=
        "LITERAL">immediately</tt> retried. Other jobs can then be
        tried for printing in the queue. It is not removed from the
        print queue, but marked as <tt class=
        "LITERAL">unprintable</tt>.</p>

        <p>When a <i class="EMPHASIS">round-robin retry</i> print
        scheduling algorithm is used, if there are no other jobs
        available for printing then the jobs that failed with <span
        class="ACRONYM">JFAILNORETRY</span> are retried. Thus, jobs
        that are submitted go to the head of the queue for
        printing, and jobs that are pending for repeat are printed
        after them. This algorithm is deprecated, and that the
        details of this algorithm are undocumented.</p>
      </div>

      <div class="SECT2">
        <h2 class="SECT2"><a name="JOTHER">16.2.9. Other
        Values</a></h2>

        <p>If a filter exits with other than the indicated value,
        or a value inappropriate for its purpose, then the result
        is treated like <span class="ACRONYM">JABORT</span>.</p>
      </div>
    </div>

    <div class="NAVFOOTER">
      <hr align="LEFT" width="100%">

      <table summary="Footer navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="33%" align="left" valign="top"><a href=
          "filters.htm" accesskey="P">Prev</a></td>

          <td width="34%" align="center" valign="top"><a href=
          "index.htm" accesskey="H">Home</a></td>

          <td width="33%" align="right" valign="top"><a href=
          "printjobformats.htm" accesskey="N">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">Filters</td>

          <td width="34%" align="center" valign="top"><a href=
          "filters.htm" accesskey="U">Up</a></td>

          <td width="33%" align="right" valign="top">Print Job
          Formats</td>
        </tr>
      </table>
    </div>
  </body>
</html>