Messages in this thread | | | Date | Thu, 07 Jan 2010 15:54:27 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH 1/2] perf: add close()/closedir() calls when needed |
| |
On 01/07/2010 02:44 PM, Alexander Beregalov wrote: > 2010/1/8 Paul Mackerras <paulus@samba.org>: >> On Thu, Jan 07, 2010 at 07:40:46PM +0300, Alexander Beregalov wrote: >> >>> Close file and directory descriptors before exiting or dying. >> >> Your patch description doesn't say why that's a good thing to do, and >> it's not obvious to me at least. Please explain the motivation in >> your patch description. > > Isn't it a good style to close files after use and before exit?
exit() closes all files, so it's redundant.
It's "good style" in the sense that it can help librarization, though.
-hpa
| |