On Sat, Jul 27, 2002 at 03:18:24PM -0500, Dan Nelson wrote:
> In the last episode (Jul 27), Cyrille Lefevre said:
> > IMHO, both the old and the newer code are wrong. they should use
> > getenv("TMPDIR") if any and certainly not the current directory.
> > there is probably more room in ${TMPDIR:-/var/tmp} then in the
> > current directory. imagine that the current fs is nearly full...
>
> Don't you want to temp filename to be in exactly the same place as the
> original file, so the rename() swap will work? If the current fs is
> full, then sed -i will fail anyway.
currently, "sed -i '' ..." shouldn't fail (except if /tmp is too small)
where "sed -i .bak ..." will. the proposed patch prevent inplace editing
even when a backup file isn't asked.
Cyrille.
--
Cyrille Lefevre mailto:[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message