Are there any stdin input length limitations (in amount of input or input speed)?
No. stdin
has no limits on length or speed.
If you want to get gigabytes of data via stdin
you can, and your computer will supply it as fast as it can.
According to everyone's other favorite Q&A site:
There shouldn't be a limit to the stream size (whether that's stdin or another). What you might want to check however, is where you store these characters ... Is there enough space to store them all ?
Try just code like this (without storing !) :
for (;;) {
int c = getc(stdin);
if (c == EOF) { break; }
putc(c, stdout);
}
and see whether it has the same restriction.
It probably depends on the stdin driver !
stdin (as a concept) has no limitation.
I expect that kernel developers (of any systems) have made some design choices which add limitations.
There aren't any length limits on stdin
. If you can't receive large amounts of data it's your code that creates the problems.
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