diff options
author | Shea Levy <shea@shealevy.com> | 2016-07-11T19·44-0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2016-07-11T19·44-0400 |
commit | cb5e7254b66a06b78a5659551a6f28fc67e52267 (patch) | |
tree | e367ff5e386fc16247034da60cf30aff61ebaea4 /src/libmain/shared.cc | |
parent | 8a41792d431d6578836fde04d1742dbba878f979 (diff) |
Modernize AutoCloseFD
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 0b6311516ad4..515d80091de3 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -325,7 +325,7 @@ RunPager::RunPager() toPager.create(); pid = startProcess([&]() { - if (dup2(toPager.readSide, STDIN_FILENO) == -1) + if (dup2(toPager.readSide.get(), STDIN_FILENO) == -1) throw SysError("dupping stdin"); if (!getenv("LESS")) setenv("LESS", "FRSXMK", 1); @@ -337,7 +337,7 @@ RunPager::RunPager() throw SysError(format("executing ‘%1%’") % pager); }); - if (dup2(toPager.writeSide, STDOUT_FILENO) == -1) + if (dup2(toPager.writeSide.get(), STDOUT_FILENO) == -1) throw SysError("dupping stdout"); } |