diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-04 22:14:57 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-04 22:14:57 +0800 |
commit | 2ac35f7b67eac709cdae7981880f7d117f9a9d75 (patch) | |
tree | 7823ebbc58916fc95187169b4b02b1c6d383734f /include/cru/base/platform | |
parent | ac3d88fc043d628979675dc3ef99ba5e1b4d58ca (diff) | |
download | cru-2ac35f7b67eac709cdae7981880f7d117f9a9d75.tar.gz cru-2ac35f7b67eac709cdae7981880f7d117f9a9d75.tar.bz2 cru-2ac35f7b67eac709cdae7981880f7d117f9a9d75.zip |
Add SetFileDescriptorFlags.
Diffstat (limited to 'include/cru/base/platform')
-rw-r--r-- | include/cru/base/platform/unix/UnixFile.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/cru/base/platform/unix/UnixFile.h b/include/cru/base/platform/unix/UnixFile.h index d2b540cd..dfbdfffb 100644 --- a/include/cru/base/platform/unix/UnixFile.h +++ b/include/cru/base/platform/unix/UnixFile.h @@ -26,6 +26,7 @@ class UnixFileDescriptor { UnixFileDescriptor& operator=(UnixFileDescriptor&& other) noexcept; bool IsValid() const; + void EnsureValid() const; int GetValue() const; void Close(); @@ -35,6 +36,8 @@ class UnixFileDescriptor { explicit operator bool() const { return this->IsValid(); } operator int() const { return this->GetValue(); } + void SetFileDescriptorFlags(int flags); + private: bool DoClose(); |