[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "chmod a+rwx A B" doesn't chmod A before chmoding B
From: |
Jim Meyering |
Subject: |
Re: "chmod a+rwx A B" doesn't chmod A before chmoding B |
Date: |
Thu, 21 Sep 2006 21:44:29 +0200 |
Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>> Regarding your conceptually separate change that adds the check
>> for fts_close failure, you're welcome to add it back, especially
>> if you can come up with a test case that triggers it.
>
> Those changes aren't needed any more, since the programs are about to
> exit anyway. They were needed only because yesterday's code sometimes
> accessed the working directory even after fts_close was called. It no
> longer does this, so there's no longer any need to check the return
> values from fts_close.
>
> I suppose we could even remove the calls to fts_close. That'd make
> the programs a bit smaller and faster, at a slight cost to conceptual
> cleanliness.
I prefer to leave them, in order to close any file descriptor and free
malloc'd storage before exiting. That makes it easier to spot real leaks.