Bug 1376 - Unnecessary error messages when tmpwatch can't lstat a file
Summary: Unnecessary error messages when tmpwatch can't lstat a file
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-03-01 09:18 UTC by jve
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 1999-04-08 17:12:29 UTC


Attachments (Terms of Use)

Description jve 1999-03-01 09:18:24 UTC
Recently, Cron sent me this little tidbit:

> Subject: Cron <root@proxy> /usr/sbin/tmpwatch 2400 /tmp
/var/tmp
>
>error: error: error: error: error: failed to lstat
/tmp/sort0388800000: No such file or directory
>failed to lstat /tmp/sort0388800001: No such file or
directory
>failed to lstat /tmp/sort0388800002: No such file or
directory
>failed to lstat /tmp/sort0388800003: No such file or
directory
>failed to lstat /tmp/sort0388800004: No such file or
directory

As it turns out, these files went away between tmpwatch
reading the directory and checking each file.

There's no reason to report this kind of error, is there?

After all, these are *temporary* files, subject to removal
at any time by the program that generated them.

Also, I don't know if this next problem has ever been fixed
since 4.2, but tmpwatch will never, ever delete an empty
directory, because in the process of checking the directory
for files, the atime gets changed.

So tmpwatch needs to save and restore the atime for any
sub-directory that it checks.

    John Van Essen <jve@gamers.org>

Comment 1 David Lawrence 1999-04-06 18:49:59 UTC
This is being assigned to a developer for further review.

Comment 2 Preston Brown 1999-04-08 17:12:59 UTC
you may now specify a --quiet or -q option to tmpwatch to make it not
warn you about these errors, if you prefer.  It is really a preference
thing.

Also, I have taken over maintenance of tmpwatch and fixed the other
bug you reported where directories were never removed because their
time was always getting updated.  The directory atime and mtime are
now restored after it is finished being processed.

These features are in tmpwatch-1.6-1 and later.


Note You need to log in before you can comment on or make changes to this bug.