aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-04-16 14:11:21 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-04-16 14:25:00 +0200
commit03ffb09c31aa04cc296c0ce10d07109e22a8dd75 (patch)
tree76b2ec3a435176d4c2d8360dc7c320704d7be088 /src/util
parent79c30363733503a1fb7d4c98aa0d56ced0be6e32 (diff)
downloadbitcoin-03ffb09c31aa04cc296c0ce10d07109e22a8dd75.tar.xz
remove unneeded bufsize option from cpp-subprocess
Diffstat (limited to 'src/util')
-rw-r--r--src/util/subprocess.hpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/util/subprocess.hpp b/src/util/subprocess.hpp
index ea555c58a4..f54223855a 100644
--- a/src/util/subprocess.hpp
+++ b/src/util/subprocess.hpp
@@ -632,16 +632,6 @@ namespace util
*/
/*!
- * The buffer size of the stdin/stdout/stderr
- * streams of the child process.
- * Default value is 0.
- */
-struct bufsize {
- explicit bufsize(int sz): bufsiz(sz) {}
- int bufsiz = 0;
-};
-
-/*!
* Base class for all arguments involving string value.
*/
struct string_arg
@@ -910,7 +900,6 @@ struct ArgumentDeducer
void set_option(executable&& exe);
void set_option(cwd&& cwdir);
- void set_option(bufsize&& bsiz);
void set_option(environment&& env);
void set_option(input&& inp);
void set_option(output&& out);
@@ -1065,9 +1054,6 @@ public:// Yes they are public
HANDLE g_hChildStd_ERR_Wr = nullptr;
#endif
- // Buffer size for the IO streams
- int bufsiz_ = 0;
-
// Pipes for communicating with child
// Emulates stdin
@@ -1525,10 +1511,6 @@ namespace detail {
popen_->cwd_ = std::move(cwdir.arg_value);
}
- inline void ArgumentDeducer::set_option(bufsize&& bsiz) {
- popen_->stream_.bufsiz_ = bsiz.bufsiz;
- }
-
inline void ArgumentDeducer::set_option(environment&& env) {
popen_->env_ = std::move(env.env_);
}
@@ -1658,16 +1640,7 @@ namespace detail {
for (auto& h : handles) {
if (h == nullptr) continue;
- switch (bufsiz_) {
- case 0:
- setvbuf(h, nullptr, _IONBF, BUFSIZ);
- break;
- case 1:
- setvbuf(h, nullptr, _IONBF, BUFSIZ);
- break;
- default:
- setvbuf(h, nullptr, _IOFBF, bufsiz_);
- };
+ setvbuf(h, nullptr, _IONBF, BUFSIZ);
}
#endif
}