Looks good!  I have added the patch to the next release.

Patrick

> From [EMAIL PROTECTED] Fri Jul 28 11:00:43 2000
> Date: Fri, 28 Jul 2000 12:26:29 -0400
> From: "William R. Knox" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: LPRng: Problem with checkpc
>
> In LPRng-3.6.22, I still have a problem with mildly over-aggressive
> behavior in checkpc. Specifically, I have a character special file in
> many queues (a null device) which I use in conjunction with Netatalk
> filtering and printing. When I run checkpc -A [time] -r -Pqueuename, it
> removes the null device from inside the queue.
>
> A check in checkpc looks to see if a file is zero length and will then
> remove it if it is older than the time set in the A flag, but doesn't
> confirm that it is a regular file. The following simple patch will fix
> that, and has been checked on Solaris 2.6 (and I at least examined the
> man page for stat on Linux and confirmed that it has the s_IFREG and
> S_IFMT constants defined):
>
> *** checkpc.c        Fri Jul 28 12:19:51 2000
> --- checkpc-patched.c        Fri Jul 28 11:59:04 2000
> ***************
> *** 326,332 ****
>                         || !safestrncmp( cf_name,"df",2 )
>                         || !safestrncmp( cf_name,"temp",4 ) );
>                 if( delta > Age && Remove ){
> !                       if( statb.st_size == 0 ){
>                                 if(Verbose)MESSAGE( "  file '%s', zero
> length file %ld hours old",
>                                         cf_name,
> (long)((delta+3599)/3600) );
>                                 unlink(cf_name);
> --- 326,332 ----
>                         || !safestrncmp( cf_name,"df",2 )
>                         || !safestrncmp( cf_name,"temp",4 ) );
>                 if( delta > Age && Remove ){
> !                       if( (statb.st_size == 0) && ((statb.st_mode &
> S_IFMT) == S_IFREG) ){
>                                 if(Verbose)MESSAGE( "  file '%s', zero
> length file %ld hours old",
>                                         cf_name,
> (long)((delta+3599)/3600) );
>                                 unlink(cf_name);
>
> -- 
>                       Bill Knox
>                       Senior Operating Systems Programmer/Analyst
>                       The MITRE Corporation

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.astart.com)

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to