Bug 45495
Summary: | /etc/cron.daily/tmpwatch does not call tmpwatch with the -s option | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | simon |
Component: | tmpwatch | Assignee: | Preston Brown <pbrown> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-06-22 07:38:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
simon
2001-06-22 07:38:27 UTC
there are no API calls that I know of to determine if a file is open. The only (non-portable) way I know of is to look in /proc/<process-id>/fd/<ids>, which is basically what fuser does. It walks this list and gives you the results. Problem with checking this is that it is racey; any program could open a file after you have already checked that PID and then you wouldn't know it because you have already examined the FDs for that PID. Second, it is semantically OK if you remove (unlink) a file if another already has it open. The data will still be written correctly. When the process quits, the data will go away. If some program is writing to a file in /tmp less than once every 10 days or so, chances are very high that it will not care if tmpwatch unlinks it. |