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>Normal Termination</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="Job Processing" href="jobsteps.htm"> 12 <link rel="PREVIOUS" title="Printing Banner At End of Job " 13 href="x7427.htm"> 14 <link rel="NEXT" title="Abnormal Termination " href= 15 "abnormalterm.htm"> 16 </head> 17 18 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 19 "#0000FF" vlink="#840084" alink="#0000FF"> 20 <div class="NAVHEADER"> 21 <table summary="Header navigation table" width="100%" border= 22 "0" cellpadding="0" cellspacing="0"> 23 <tr> 24 <th colspan="3" align="center">LPRng Reference Manual: 5 25 Sep 2003 (For LPRng-3.8.22)</th> 26 </tr> 27 28 <tr> 29 <td width="10%" align="left" valign="bottom"><a href= 30 "x7427.htm" accesskey="P">Prev</a></td> 31 32 <td width="80%" align="center" valign="bottom">Chapter 33 15. Job Processing</td> 34 35 <td width="10%" align="right" valign="bottom"><a href= 36 "abnormalterm.htm" accesskey="N">Next</a></td> 37 </tr> 38 </table> 39 <hr align="LEFT" width="100%"> 40 </div> 41 42 <div class="SECT1"> 43 <h1 class="SECT1"><a name="NORMALTERM">15.9. Normal 44 Termination</a></h1> 45 46 <p>Options used:</p> 47 48 <ul> 49 <li> 50 <p><var class="LITERAL">fq</var> FLAG <span class= 51 "emphasis"><i class="EMPHASIS">Form Feed on 52 Close</i></span></p> 53 </li> 54 55 <li> 56 <p><var class="LITERAL">la</var> FLAG <span class= 57 "emphasis"><i class="EMPHASIS">Local Printer 58 Accounting</i></span></p> 59 </li> 60 61 <li> 62 <p><var class="LITERAL">tr=</var><span class= 63 "emphasis"><i class="EMPHASIS">Trailer on 64 Close</i></span></p> 65 </li> 66 67 <li> 68 <p><var class="LITERAL">ae=</var><span class= 69 "emphasis"><i class="EMPHASIS">Accounting at 70 end</i></span></p> 71 </li> 72 73 <li> 74 <p><var class="LITERAL">save_when_done</var> FLAG <span 75 class="emphasis"><i class="EMPHASIS">Save when 76 done</i></span></p> 77 </li> 78 79 <li> 80 <p><var class="LITERAL">save_on_error</var> FLAG <span 81 class="emphasis"><i class="EMPHASIS">Do not delete on 82 error</i></span></p> 83 </li> 84 85 <li> 86 <p><var class="LITERAL">done_jobs=N</var><span class= 87 "emphasis"><i class="EMPHASIS">Save status of last N 88 jobs</i></span></p> 89 </li> 90 91 <li> 92 <p><var class="LITERAL">wait_for_eof</var> FLAG <span 93 class="emphasis"><i class="EMPHASIS">Wait for EOF before 94 closing device</i></span></p> 95 </li> 96 97 <li> 98 <p><var class="LITERAL">socket_linger</var><span class= 99 "emphasis"><i class="EMPHASIS">socket linger 100 timeout</i></span></p> 101 </li> 102 103 <li> 104 <p><var class="LITERAL">half_close</var> FLAG <span 105 class="emphasis"><i class="EMPHASIS">use shutdown() and 106 not close()</i></span></p> 107 </li> 108 </ul> 109 <br> 110 <br> 111 112 <p>Sequence of Operations:</p> 113 114 <ol type="1"> 115 <li> 116 <p>If we are printing and the <var class= 117 "LITERAL">fq</var> flag is set and the <var class= 118 "LITERAL">sf</var> (suppress interfile FF) flag is set, 119 then the <var class="LITERAL">ff</var> (form feed) string 120 will be interpreted and sent to the of_fd.</p> 121 </li> 122 123 <li> 124 <p>If we are printing, the <var class="LITERAL">tr</var> 125 (trailer) string will be interpreted and sent to the 126 of_fd.</p> 127 </li> 128 129 <li> 130 <p>If printing and the <var class="LITERAL">la</var> 131 (local printer accounting) flag is set or transferring a 132 job and the <var class="LITERAL">ar</var> (remote 133 accounting) flag is set, the <var class= 134 "LITERAL">ae</var> is examined and accounting is done as 135 described for the <span class="emphasis"><i class= 136 "EMPHASIS"><a href="opendevice.htm#ACCOUNTSTART">as</a> 137 field.</i></span></p> 138 </li> 139 140 <li> 141 <p>If the <var class="LITERAL">:of</var> filter is 142 present, its <acronym class="ACRONYM">STDIN</acronym> is 143 closed, and the <b class="APPLICATION">lpd</b> server 144 waits for it to exit. The exit status is used as 145 described above.</p> 146 </li> 147 148 <li> 149 <p>If the device is a socket or network connection, the 150 socket linger time is set to <var class= 151 "LITERAL">socket_linger</var> value if nonzero.</p> 152 </li> 153 154 <li> 155 <p>If the <var class="LITERAL">half_shut</var> flag is 156 set, then a <var class= 157 "LITERAL">shutdown(fd,WR_DONE)</var> will be done on the 158 connection. This tells the TCP/IP stack that all data 159 transmission has been completed. Errors or other 160 information can still be read from the connection. If the 161 <var class="LITERAL">half_shut</var> flag is clear, then 162 a <var class="LITERAL">close(fd)</var> will be done and 163 no errors or other information will be read.</p> 164 </li> 165 166 <li> 167 <p>If the <var class="LITERAL">wait_for_eof</var> option 168 is true (default) then a read is done on the connection 169 until an EOF is found. The device (io_fd) is then 170 closed.</p> 171 </li> 172 173 <li> 174 <p>The job is marked as completed in the spool queue.</p> 175 </li> 176 177 <li> 178 <p>If the <var class="LITERAL">save_when_done</var> flag 179 is clear and the <var class="LITERAL">done_jobs</var> and 180 <var class="LITERAL">done_jobs_max_age</var> values are 181 zero (0), the job is removed.</p> 182 </li> 183 184 <li> 185 <p>If the <var class="LITERAL">done_jobs</var> or <var 186 class="LITERAL">done_jobs_max_age</var> values are 187 nonzero, the spool queue is periodically checked and for 188 an excess number of jobs or jobs with old status. This 189 action is suppressed if either the <var class= 190 "LITERAL">save_when_done</var> or <var class= 191 "LITERAL">save_on_error</var> flag is set.</p> 192 </li> 193 </ol> 194 <br> 195 <br> 196 </div> 197 198 <div class="NAVFOOTER"> 199 <hr align="LEFT" width="100%"> 200 201 <table summary="Footer navigation table" width="100%" border= 202 "0" cellpadding="0" cellspacing="0"> 203 <tr> 204 <td width="33%" align="left" valign="top"><a href= 205 "x7427.htm" accesskey="P">Prev</a></td> 206 207 <td width="34%" align="center" valign="top"><a href= 208 "index.htm" accesskey="H">Home</a></td> 209 210 <td width="33%" align="right" valign="top"><a href= 211 "abnormalterm.htm" accesskey="N">Next</a></td> 212 </tr> 213 214 <tr> 215 <td width="33%" align="left" valign="top">Printing Banner 216 At End of Job</td> 217 218 <td width="34%" align="center" valign="top"><a href= 219 "jobsteps.htm" accesskey="U">Up</a></td> 220 221 <td width="33%" align="right" valign="top">Abnormal 222 Termination</td> 223 </tr> 224 </table> 225 </div> 226 </body> 227</html> 228 229