stdin
is of type FILE *
,
is there a fd
macro for it?
Or do I need to convert it myself?
Since the symbols stdin, stdout, and stderr are specified to be macros, assigning to them is nonportable.
Standard input value stdin. Its value is 0.
In Linux, stdin is the standard input stream. This accepts text as its input. Text output from the command to the shell is delivered via the stdout (standard out) stream. Error messages from the command are sent through the stderr (standard error) stream.
STDIN_FILENO
from unistd.h
fileno(stdin)
The following are the integer file descriptors for the standard streams:
stdin
stdout
stderr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With