@@ -631,16 +631,6 @@ namespace util
631
631
* -------------------------------
632
632
*/
633
633
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
-
644
634
/* !
645
635
* Base class for all arguments involving string value.
646
636
*/
@@ -910,7 +900,6 @@ struct ArgumentDeducer
910
900
911
901
void set_option (executable&& exe);
912
902
void set_option (cwd&& cwdir);
913
- void set_option (bufsize&& bsiz);
914
903
void set_option (environment&& env);
915
904
void set_option (input&& inp);
916
905
void set_option (output&& out);
@@ -1065,9 +1054,6 @@ class Streams
1065
1054
HANDLE g_hChildStd_ERR_Wr = nullptr ;
1066
1055
#endif
1067
1056
1068
- // Buffer size for the IO streams
1069
- int bufsiz_ = 0 ;
1070
-
1071
1057
// Pipes for communicating with child
1072
1058
1073
1059
// Emulates stdin
@@ -1525,10 +1511,6 @@ namespace detail {
1525
1511
popen_->cwd_ = std::move (cwdir.arg_value );
1526
1512
}
1527
1513
1528
- inline void ArgumentDeducer::set_option (bufsize&& bsiz) {
1529
- popen_->stream_ .bufsiz_ = bsiz.bufsiz ;
1530
- }
1531
-
1532
1514
inline void ArgumentDeducer::set_option (environment&& env) {
1533
1515
popen_->env_ = std::move (env.env_ );
1534
1516
}
@@ -1658,16 +1640,7 @@ namespace detail {
1658
1640
1659
1641
for (auto & h : handles) {
1660
1642
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);
1671
1644
}
1672
1645
#endif
1673
1646
}
0 commit comments