diff options
Diffstat (limited to 'include/linux/fdtable.h')
| -rw-r--r-- | include/linux/fdtable.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index c45306a9f007..afdfaad381df 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h @@ -101,8 +101,17 @@ struct task_struct; void put_files_struct(struct files_struct *fs); int unshare_files(void); +enum fd_range_flags { + /* Leave behind all descriptors outside of the specified range. */ + FD_RANGE_EXCEPT = (1U << 0), + + /* Only select descriptors that have close-on-exec set. */ + FD_RANGE_CLOEXEC_ONLY = (1U << 1), +}; + struct fd_range { unsigned int from, to; + enum fd_range_flags flags; }; struct files_struct *dup_fd(struct files_struct *, struct fd_range *) __latent_entropy; void do_close_on_exec(struct files_struct *); |
