diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-07-22 12:43:22 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-07-23 20:06:50 +0300 |
commit | 1d9f410810de6fbb9c974735e5e14dbebe1c0718 (patch) | |
tree | f44b04d9e0a13a21deb7f59f1a2ae8334daf7f94 /bpkg/archive.cxx | |
parent | 7ea82c5013ab3c3d44b4b85cf767559e7019854f (diff) |
Adapt to fdstream extension
Diffstat (limited to 'bpkg/archive.cxx')
-rw-r--r-- | bpkg/archive.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bpkg/archive.cxx b/bpkg/archive.cxx index 0edf09d..f0596bf 100644 --- a/bpkg/archive.cxx +++ b/bpkg/archive.cxx @@ -93,15 +93,14 @@ namespace bpkg try { - ifdstream is (pr.in_ofd); - // Do not throw when eofbit is set (end of stream reached), and // when failbit is set (getline() failed to extract any character). // - is.exceptions (ifdstream::badbit); + ifdstream is (pr.in_ofd, ifdstream::badbit); string s; getline (is, s, '\0'); + is.close (); if (pr.wait ()) return s; @@ -113,7 +112,7 @@ namespace bpkg // Child exit status doesn't matter. Just wait for the process // completion and fall through. // - pr.wait (); + pr.wait (); // Check throw. } // While it is reasonable to assuming the child process issued diagnostics |