mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-13 12:33:20 +02:00
16 lines
184 B
C++
16 lines
184 B
C++
#include"Net/Fd.hpp"
|
|
#include<errno.h>
|
|
#include<unistd.h>
|
|
|
|
namespace Net {
|
|
|
|
Fd::~Fd() {
|
|
if (fd >= 0) {
|
|
/* Ignore errors. */
|
|
auto err = errno;
|
|
close(fd);
|
|
errno = err;
|
|
}
|
|
}
|
|
|
|
}
|