coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm should exit immediately if the user cannot write to the parent di


From: Alex Henrie
Subject: Re: rm should exit immediately if the user cannot write to the parent directory
Date: Thu, 3 Sep 2015 21:48:28 -0600

2015-09-03 9:56 GMT-06:00 Pádraig Brady <address@hidden>:
> I see your point.  It's similar to the prompting discussed in
> http://bugs.gnu.org/16669

Thanks for pointing me to that discussion, it was very interesting.
Reading through it made me realize that step 3 of the current POSIX rm
standard <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html>
requires rm to always prompt if the file is read-only, regardless of
whether the file can actually be deleted.

2015-09-03 11:55 GMT-06:00 Jim Meyering <address@hidden>:
> If you can find a way to avoid the spurious prompt without
> the cost of an additional stat-style FS access, or a way to
> ensure that the cost is incurred only when we're going to
> present an interactive prompt (in which case it's negligible),
> then maybe.

I'd like to see the standard changed so that once rm determines that
the file is read-only, it may optionally check that the file can
actually be deleted and skip the prompt if it cannot. The default
codepath would not be affected, and the extra compute time is nothing
compared to the time it would save the user.

What is the appropriate place to discuss proposed revisions to the
POSIX standard?

-Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]