Bug 186851
Summary: | Can't use touch(1) when /proc is not mounted or unavailable | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Russell Coker <rcoker> |
Component: | coreutils | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5 | CC: | meyering |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | FC6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-12-15 12:07:18 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
Russell Coker
2006-03-27 02:57:53 UTC
Thanks for the report. That has been fixed upstream. Now, it falls back on using utimes if futimes or futimesat (the libc calls that might use /proc/self/fd/0) fails. Also, with newer kernels (2.6.16), futimesat is a syscall, so doesn't rely on /proc. If we know beforehand that the file doesn't exist, then you're right that we could save syscalls. However, it's not possible to detect the condition in a useful/reliable manner -- there'd be a race: someone could create the file between when lstat says it doesn't exist and the open above. Then touch would fail unnecessarily once again. |