Bruno Haible <[EMAIL PROTECTED]> wrote: > "touch --inside" is a best-effort operation, which will not work on ...
My point was that if touch actually fails to update a timestamp, it must give a diagnostic. With your patch, using --inside suppresses the failure and diagnostic in some cases. E.g., $ : > x $ sudo chown root x $ ./touch --inside x $ ./touch x ./touch: cannot touch `x': Permission denied [Exit 1] >> And wouldn't it be better also to use O_NONBLOCK | O_NOCTTY, as >> for the other open call? > > Maybe. One has to test whether "touch --inside /dev/tty" hangs or not. > I can agree to it as long as you are sure that O_NONBLOCK, applied to > regular files, has no effect (I'm not sure POSIX guarantees this). Maybe?? Isn't the fact that the existing implementation has been using those options for years without trouble enough of a guarantee? Both were added in response to problem reports. Getting the conceptually simple touch `right' has been surprisingly tricky over the years. Any deviation from the current practice must be very well justified, not the other way around. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils