mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibCore: Prevent LockFile fd from leaking into child process
Fixes #9059
This commit is contained in:
parent
15cdb702c2
commit
5d6bf83374
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ LockFile::LockFile(char const* filename, Type type)
|
|||
if (!Core::File::ensure_parent_directories(m_filename))
|
||||
return;
|
||||
|
||||
m_fd = open(filename, O_RDONLY | O_CREAT, 0666);
|
||||
m_fd = open(filename, O_RDONLY | O_CREAT | O_CLOEXEC, 0666);
|
||||
if (m_fd == -1) {
|
||||
m_errno = errno;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue