diff options
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r-- | src/libutil/util.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index e77009321d8d..0af6ee149bae 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -415,6 +415,15 @@ bool AutoCloseFD::isOpen() } +/* Pass responsibility for closing this fd to the caller. */ +int AutoCloseFD::borrow() +{ + int oldFD = fd; + fd = -1; + return oldFD; +} + + void Pipe::create() { int fds[2]; |