ladybird/Libraries/LibIPC/AutoCloseFileDescriptor.cpp
Timothy Flynn 674075f79e Everywhere: Remove LibCore/System.h includes from header files
This reduces the number of compilation jobs when System.h changes from
about 750 to 60. (There are still a large number of linker jobs.)
2025-12-04 15:40:46 +00:00

23 lines
387 B
C++

/*
* Copyright (c) 2025, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/System.h>
#include <LibIPC/AutoCloseFileDescriptor.h>
namespace IPC {
AutoCloseFileDescriptor::AutoCloseFileDescriptor(int fd)
: m_fd(fd)
{
}
AutoCloseFileDescriptor::~AutoCloseFileDescriptor()
{
if (m_fd != -1)
(void)Core::System::close(m_fd);
}
}