Jim Meyering writes:

> Thanks for doing that.
> I like the idea, but have a couple questions.
> Shouldn't it give a diagnostic and fail when the open from
> `time_from_inside' fails?

Maybe.

"touch --inside" is a best-effort operation, which will not work on
all those files that don't have a timestamp inside them. If I do
  "touch --inside /mirror/gnu/*"
as a user, I don't want error messages that tell me that the various
directories and READMEs didn't have a timestamp. Same reason why now
"grep xyz *" doesn't emit an error message any more when it encounters
a directory.

Now is it better to treat unreadable files like empty files, i.e. like
files without timestamp? I don't know.

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

Bruno


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to