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$[email protected]>,
Paul Edwards <[email protected]> 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.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,071 |
Nodes: | 10 (0 / 10) |
Uptime: | 01:13:38 |
Calls: | 13,749 |
Calls today: | 1 |
Files: | 186,978 |
D/L today: |
4,917 files (1,414M bytes) |
Messages: | 2,424,312 |