What's the int macro for stdin?
stdin
is of type FILE *
,
is开发者_如何学运维 there a fd
macro for it?
Or do I need to convert it myself?
STDIN_FILENO
from unistd.h
fileno(stdin)
The following are the integer file descriptors for the standard streams:
- 0:
stdin
- 1:
stdout
- 2:
stderr
精彩评论