> From [EMAIL PROTECTED] Mon Aug 12 07:17:56 2002
> From: "Lee, Jim" <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: LPRng: Silly race condition and lots of jobs
> Date: Mon, 12 Aug 2002 09:23:41 -0400
>
> Patrick,
>
> Would a similar check in done jobs checking solve the issue I have been
> seeing with losing incoming files when a filter script finishes on a job
> that starts and finishes while a large file is being received?
I hesitate in saying 'Yes', but this fits into the general
class of race conditions where the code that is executed at the
end of printing all the jobs in the queue:
a) rescans the input queue for new work
b) calls 'Remove_done_jobs' with the list of jobs in the
queue
c) Remove_done_jobs now rescans the queue. The code in
Remove_done_jobs called a couple of routines that
get the hold and control file, and also check for
any error conditions. Unfortunately, the check for
error condition should not be done if the INCOMING_JOB
flag is set.
Umm... the problem is that most of the time the control file
is empty... with no information in it, so the scan operation
will ignore it. It is only when the the two operations of
finish receiving a job and finish printing a job overlap
that there is this possibility.
>
> Jim Lee
>
> -----Original Message-----
> From: Patrick Powell [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 11, 2002 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: LPRng: Silly race condition and lots of jobs
>
>
> OK OK - this one was bloody obvious when I looked at
> it.
>
> a) If you have incoming jobs (lots of them)
> b) AND you do not have an active print spooler
> c) AND you do an LPQ which then scans the queue
> for 'stale or error jobs' and removes them
> THEN there was the possibility that one or more of the
> incoming jobs, because they did not have all of the
> data files AND the &*()()*& removal function did not check
> for 'INCOMING_JOB' status and marked the job as 'erroneous'
> you would get one of the incoming jobs removed... actually,
> you MIGHT get the job removed... or not...
>
> I now check to see if the 'INCOMING' flag is set before
> checking tosee if there is an error OR if the job is done.
>
> This appears to solve the problem.
>
> Patrick
>
> ----------------------------------------------------------------------------
> -
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the
> impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> ----------------------------------------------------------------------------
> -
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
>
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------