aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/bpkg.cxx26
1 files changed, 4 insertions, 22 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx
index b93637c..85ada84 100644
--- a/bpkg/bpkg.cxx
+++ b/bpkg/bpkg.cxx
@@ -10,7 +10,7 @@
#include <exception> // set_terminate(), terminate_handler
#include <type_traits> // enable_if, is_base_of
-#include <libbutl/fdstream.hxx> // std*_fdmode()
+#include <libbutl/fdstream.hxx> // stderr_fd(), fdterm()
#include <libbutl/backtrace.hxx> // backtrace()
// Embedded build system driver.
@@ -608,23 +608,10 @@ try
default_terminate = set_terminate (custom_terminate);
- // Note that the standard stream descriptors can potentially be in the
- // non-blocking mode, which the C++ streams are not suited for and which are
- // not fully supported by butl::iofdstreams. Using such descriptors may lead
- // to various weird failures (see GH issue #417 for the reproducer). Thus,
- // we just turn such descriptors into the blocking mode at the beginning of
- // the program execution.
+ // Note that this call sets PATH to include our baseutils /bin on Windows
+ // and ignores SIGPIPE (besides other things).
//
- try
- {
- stdin_fdmode (fdstream_mode::blocking);
- stdout_fdmode (fdstream_mode::blocking);
- stderr_fdmode (fdstream_mode::blocking);
- }
- catch (const io_error& e)
- {
- fail << "unable to turn standard streams into blocking mode: " << e;
- }
+ build2::init_process ();
if (fdterm (stderr_fd ()))
{
@@ -647,11 +634,6 @@ try
exec_dir = path (argv[0]).directory ();
build2_argv0 = argv[0];
- // Note that this call sets PATH to include our baseutils /bin on Windows
- // and ignores SIGPIPE.
- //
- build2::init_process ();
-
argv_file_scanner argv_scan (argc, argv, "--options-file", false, args_pos);
group_scanner scan (argv_scan);