aboutsummaryrefslogtreecommitdiff
path: root/butl/pager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'butl/pager.cxx')
-rw-r--r--butl/pager.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/butl/pager.cxx b/butl/pager.cxx
index b154a5c..a03582c 100644
--- a/butl/pager.cxx
+++ b/butl/pager.cxx
@@ -15,6 +15,7 @@
#endif
#include <cstring> // strchr()
+#include <utility> // move()
#include <system_error>
#include <butl/fdstream> // fdclose()
@@ -134,13 +135,13 @@ namespace butl
bool r;
if (p_.try_wait (r))
{
- fdclose (p_.out_fd);
+ p_.out_fd.reset ();
if (pager != nullptr)
throw system_error (ECHILD, system_category ());
}
else
- os_.open (p_.out_fd);
+ os_.open (move (p_.out_fd));
}
catch (const process_error& e)
{