【发布时间】:2012-07-03 16:01:37
【问题描述】:
我有这个代码:
#include <stdio.h>
#include <unistd.h>
int main()
{
while(1)
{
fprintf(stdout,"hello-out");
fprintf(stderr,"hello-err");
sleep(1);
}
return 0;
}
输出为hello-errhello-errhello-errhello-errhello-errhello-err
以 1 秒为间隔。
我想知道为什么 hello-out 永远不会被打印出来。
【问题讨论】:
-
很好,很明确的问题。 +111111!