mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:27:35 +00:00
Add close-on-exec flag for file descriptors.
I was surprised to find that dup()'ed fds don't share the close-on-exec flag. That means it has to be stored separately from the FileDescriptor object.
This commit is contained in:
parent
19b9401487
commit
97c799576a
10 changed files with 74 additions and 35 deletions
11
AK/Vector.h
11
AK/Vector.h
|
@ -142,6 +142,17 @@ public:
|
|||
m_impl->remove(index);
|
||||
}
|
||||
|
||||
Vector& operator=(const Vector<T>& other)
|
||||
{
|
||||
if (this != &other) {
|
||||
clear();
|
||||
ensureCapacity(other.size());
|
||||
for (const auto& v : other)
|
||||
unchecked_append(v);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void append(Vector<T>&& other)
|
||||
{
|
||||
Vector<T> tmp = move(other);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue