lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] vfs: don't bother clearing close_on_exec bit for unused fds
From
Date
On Tue, 2015-11-03 at 10:41 +0100, Rasmus Villemoes wrote:

> @@ -667,7 +667,7 @@ void do_close_on_exec(struct files_struct *files)
> fdt = files_fdtable(files);
> if (fd >= fdt->max_fds)
> break;
> - set = fdt->close_on_exec[i];
> + set = fdt->close_on_exec[i] & fdt->open_fds[i];
> if (!set)
> continue;
> fdt->close_on_exec[i] = 0;

If you don't bother, why leaving this final fdt->close_on_exec[i] = 0 ?





\
 
 \ /
  Last update: 2015-11-04 02:41    [W:0.237 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site