VFS: prevent FD inheritance for the kernel completely.

* Each io_context now has a "inherit_fds" member that decides whether
  or not this context allows to inherit FDs to its children.
* This replaces the former O_CLOEXEC mechanism.
This commit is contained in:
Axel Dörfler
2015-09-11 17:08:35 +02:00
parent 16844b92fc
commit 6adf7a0c75
2 changed files with 22 additions and 18 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011, Axel Dörfler, [email protected].
* Copyright 2002-2015, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
@@ -58,6 +58,7 @@ typedef struct io_context {
struct list node_monitors;
uint32 num_monitors;
uint32 max_monitors;
bool inherit_fds;
} io_context;