- 论坛徽章:
- 0
|
回复 5# kaede_1
Glibc. See filedoalloc.c:L111. Here we use stat() to test if the fd is a tty, and set the buffering mode accordingly. (This is called from fileops.c.) stdout initially has a null buffer, and it's allocated on the first use of the stream based on the characteristics of fd 1.
大意是glibc通过判断文件描述符是不是tty来决定缓冲的方式,是tty的话就采用行缓冲。
悲剧,没有权限发表URL。但是难不倒我,我把URL用base64转换了下 。
aHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucy8xMzkzMjkzMi93aHktZG9lcy1zdGRvdXQtbmVlZC1leHBsaWNpdC1mbHVzaGluZy13aGVuLXJlZGlyZWN0ZWQtdG8tZmlsZQ== |
|