1
#if !defined(__linux__)
2
#error "Linux platform file is part of non-Linux build."
3
#endif
4

            
5
#include "source/exe/platform_impl.h"
6

            
7
#include <sys/prctl.h>
8

            
9
#include "source/common/common/thread_impl.h"
10
#include "source/common/filesystem/filesystem_impl.h"
11

            
12
namespace Envoy {
13

            
14
PlatformImpl::PlatformImpl()
15
50
    : thread_factory_(Thread::PosixThreadFactory::create()),
16
50
      file_system_(std::make_unique<Filesystem::InstanceImplPosix>()) {}
17

            
18
50
PlatformImpl::~PlatformImpl() = default;
19

            
20
2
bool PlatformImpl::enableCoreDump() { return prctl(PR_SET_DUMPABLE, 1) != -1; }
21

            
22
} // namespace Envoy