2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
// author: Max Kellermann <max.kellermann@gmail.com>
|
2013-08-07 19:18:08 +02:00
|
|
|
|
2018-08-22 15:31:19 +02:00
|
|
|
#include "EpollFD.hxx"
|
2017-08-11 09:39:47 +02:00
|
|
|
#include "Error.hxx"
|
2013-08-07 19:18:08 +02:00
|
|
|
|
2018-08-22 15:31:19 +02:00
|
|
|
EpollFD::EpollFD()
|
2013-08-07 19:18:08 +02:00
|
|
|
:fd(::epoll_create1(EPOLL_CLOEXEC))
|
|
|
|
{
|
2018-08-22 15:38:22 +02:00
|
|
|
if (!fd.IsDefined())
|
2017-08-11 09:39:47 +02:00
|
|
|
throw MakeErrno("epoll_create1() failed");
|
2013-08-07 19:18:08 +02:00
|
|
|
}
|