windows命令行是否有像linux命令行中stdbuf之类的命令

我想将pipe的全缓冲变成行缓冲

具体来说,我在写一个a.php,要调用一个a.exe,假设两个脚本都在一个文件夹下。
我通过popen的方法异步执行a.exe。

// a.exe的输出结果输入到管道中,$file为管道句柄
$file = popen("./a.exe", "r");
while (!feof($file)) {
    echo fgets($file);
}

但这样会导致a.exe只有输出4kb后,fgets才能拿到数据。
a.exe执行很慢,1分钟的数据才够4kb,体验很差。

我想将让./a.exe只要输出一行就刷出来。在linux下,我可以通过stdbuf实现。

// a.exe的输出结果输入到管道中,$file为管道句柄
$file = popen("stdbuf -oL ./a.exe", "r");
while (!feof($file)) {
    echo fgets($file);
}

谁来告诉我在windows下我该怎么写。

PHP不就是运行在Linux上面的吗?

https://stackoverflow.com/questions/13317375/is-there-an-stdbuf-equivalent-for-windows-7-command-prompt