阅读背景:

如何以编程方式停止从stdin读取?

来源:互联网 

fgetc() and other input functions can return when there's no data on the file descriptor. This can be simulated for console applications reading from stdin typing Ctrl-D on keyboard (at least on unix). But how to do it programmatically? For example, how to return from the fgetc() in the reader thread in the following code (NB: ignore the possible race condition)?fgetc() and other input functions can return wh




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: