@@ -631,16 +631,6 @@ namespace util
631631 * -------------------------------
632632 */
633633
634- /* !
635- * The buffer size of the stdin/stdout/stderr
636- * streams of the child process.
637- * Default value is 0.
638- */
639- struct bufsize {
640- explicit bufsize (int sz): bufsiz(sz) {}
641- int bufsiz = 0 ;
642- };
643-
644634/* !
645635 * Base class for all arguments involving string value.
646636 */
@@ -910,7 +900,6 @@ struct ArgumentDeducer
910900
911901 void set_option (executable&& exe);
912902 void set_option (cwd&& cwdir);
913- void set_option (bufsize&& bsiz);
914903 void set_option (environment&& env);
915904 void set_option (input&& inp);
916905 void set_option (output&& out);
@@ -1065,9 +1054,6 @@ class Streams
10651054 HANDLE g_hChildStd_ERR_Wr = nullptr ;
10661055#endif
10671056
1068- // Buffer size for the IO streams
1069- int bufsiz_ = 0 ;
1070-
10711057 // Pipes for communicating with child
10721058
10731059 // Emulates stdin
@@ -1525,10 +1511,6 @@ namespace detail {
15251511 popen_->cwd_ = std::move (cwdir.arg_value );
15261512 }
15271513
1528- inline void ArgumentDeducer::set_option (bufsize&& bsiz) {
1529- popen_->stream_ .bufsiz_ = bsiz.bufsiz ;
1530- }
1531-
15321514 inline void ArgumentDeducer::set_option (environment&& env) {
15331515 popen_->env_ = std::move (env.env_ );
15341516 }
@@ -1658,16 +1640,7 @@ namespace detail {
16581640
16591641 for (auto & h : handles) {
16601642 if (h == nullptr ) continue ;
1661- switch (bufsiz_) {
1662- case 0 :
1663- setvbuf (h, nullptr , _IONBF, BUFSIZ);
1664- break ;
1665- case 1 :
1666- setvbuf (h, nullptr , _IONBF, BUFSIZ);
1667- break ;
1668- default :
1669- setvbuf (h, nullptr , _IOFBF, bufsiz_);
1670- };
1643+ setvbuf (h, nullptr , _IONBF, BUFSIZ);
16711644 }
16721645 #endif
16731646 }
0 commit comments