Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 38:01:34 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
22 files (29,767K bytes) |
Messages: | 173,681 |
And obviously if it's a POSIX system, it can do a select() on the
file numbers ...
parmnumber = fselect(stdin, comm_fp, NULL);
In article <10ag6sc$3m3q1$1@dont-email.me>,
Paul Edwards <mutazilah@gmail.com> wrote:
parmnumber = fselect(stdin, comm_fp, NULL);
I remember writing an fselect() back in the 1980s.
A problem with replicating select() at the FILE level is the buffering
within standard i/o system. The obvious solution is for fselect() to
return immediately if any data is already buffered for any of the
FILEs. That's not ideal because whether standard i/o input functions
block depends on the data itself. Suppose the single character "1"
was buffered, then fgetc() would succeed immediately, but fgets()
would block. All you could really guarantee is that a single fgetc()
would return immediately.
A problem with replicating select() at the FILE level is the buffering
within standard i/o system.