mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:07:34 +00:00
LibCore: Open files with O_CLOEXEC by default
This changes Core::File::open() to specify O_CLOEXEC by default so that we don't leak file descriptors into child processes. The new behavior can be overriden by specifying OpenMode::KeepOnExec.
This commit is contained in:
parent
67ed580532
commit
fbfd0ed5ab
2 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,7 @@ enum class OpenMode : unsigned {
|
|||
Append = 4,
|
||||
Truncate = 8,
|
||||
MustBeNew = 16,
|
||||
KeepOnExec = 32,
|
||||
};
|
||||
|
||||
enum class SeekMode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue