AK: MappedFile should open with O_CLOEXEC.

This commit is contained in:
Andreas Kling 2019-04-18 22:19:42 +02:00
parent 3c0afccca0
commit 6f9df89c92
Notes: sideshowbarker 2024-07-19 14:39:51 +09:00

View file

@ -13,7 +13,7 @@ MappedFile::MappedFile(const String& file_name)
: m_file_name(file_name)
{
m_size = PAGE_SIZE;
m_fd = open(m_file_name.characters(), O_RDONLY);
m_fd = open(m_file_name.characters(), O_RDONLY | O_CLOEXEC);
if (m_fd != -1) {
struct stat st;