Skip to content

Commit

Permalink
Merge branch 'master' into fix-fdpassing-test
Browse files Browse the repository at this point in the history
  • Loading branch information
bramoosterhuis committed Jan 10, 2023
2 parents 5272606 + e9e8830 commit 034280c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/core/PrivilegedRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ namespace Core {
Descriptor(const Descriptor& copy)
: _descriptor(-1) {
if (copy._descriptor != -1) {
#ifndef __WINDOWS__
_descriptor = ::dup(copy._descriptor);
#endif
}
}
~Descriptor() {
if (_descriptor != -1) {
#ifndef __WINDOWS__
::close(_descriptor);
#endif
}
}

Expand All @@ -76,7 +80,9 @@ namespace Core {
}
void Move(int&& descriptor) {
if (_descriptor != -1) {
#ifndef __WINDOWS__
::close(_descriptor);
#endif
}
_descriptor = descriptor;
descriptor = -1;
Expand Down

0 comments on commit 034280c

Please sign in to comment.