[#30743] 大きな数の大まかな割り算 — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

17 messages 2007/05/01

[#30827] Supporting Fiber — SASADA Koichi <ko1@...>

 ささだです。

22 messages 2007/05/27

[ruby-dev:30811] Re: FileUtils.rm_rf misfeature?

From: Takahiro Kambe <taca@...>
Date: 2007-05-24 13:27:38 UTC
List: ruby-dev #30811
In message <200705240140.l4O1etRE024838@sharui.nakada.kanuma.tochigi.jp>
	on Thu, 24 May 2007 10:40:56 +0900,
	Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
> > Will your patch be applied to the archives? It seems to work as I
> > would have expected for "rm_rf". And for "rm_f" too, that had the same
> > problem.
> 
> ENOENTだけを無視するrm -fと違って、FileUtils.rm_rfやrm_fがすべ
> てのエラーを無視している、という件ですが、これは意図的な違いで
> しょうか。とくに理由があるのでなければ、合わせたほうが望ましい
> のではないかと思うのですが。
NetBSD 3.1_STABLE(およびcurrent)のrm(1)の互換性のところでは、

     The rm utility differs from historical implementations in that the -f
     option only masks attempts to remove non-existent files instead of mask-
     ing a large variety of errors.

といった記述もあります。そして、現在の実装では、

	ENOENT
	ENAMETOOLONG
	ENOTDIR

を無視しています。元のやりとりにもよると思いますが、案外環境によって
rm(1)の-fオプションの実装も違うという場合もありそうです。

FreeBSD 6.2-STABLEでは、ENOENTだけを無視しています。

以上、ご参考までに。

-- 
神戸 隆博(かんべ たかひろ)		at 仕事場 

In This Thread