| Deutsch English Français Italiano |
|
<vn1coj$2ft7e$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c Subject: Re: C90 fpeek Date: Fri, 24 Jan 2025 16:54:42 -0800 Organization: A noiseless patient Spider Lines: 25 Message-ID: <vn1coj$2ft7e$1@dont-email.me> References: <vmv082$1u6pm$1@dont-email.me> <87plkc6bgm.fsf@nosuchdomain.example.com> <a7NkP.76379$ZEZf.241@fx40.iad> <20250124114602.417@kylheku.com> <vn13c3$2e8p8$1@dont-email.me> <20250124165108.87@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 25 Jan 2025 01:54:43 +0100 (CET) Injection-Info: dont-email.me; posting-host="635ba437aaf51caf1bc9969eec7ea59c"; logging-data="2618606"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pZwzfFRjfjW2aVZ51ArVSVvp3iFeHoYc=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:HGeSOl6B5mjn5xsEMaA0TfVwzFs= In-Reply-To: <20250124165108.87@kylheku.com> Content-Language: en-US Bytes: 2104 On 1/24/2025 4:52 PM, Kaz Kylheku wrote: > On 2025-01-24, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >> On 1/24/2025 11:48 AM, Kaz Kylheku wrote: >>> Unless you non-portably arranged otherwise. E.g. on POSIX >>> we can get the fileno(stream), and use fcntl to set up O_NONBLOCK. >>> Then get(stream) returns EOF, with errno set to EWOULDBLOCK >>> and we whave to clearerr(stream), then poll the fd, and so it goes. >>> >>> Been there done that. Went back there, done that again, >>> and then several more times, like a raging masochist. >> >> Why not use AIO? > > In conjunction with stdio buffering? It doesn't seem possible; you have > to go through alternative functions like aio_read, which stdio doesn't > interface with. Touche! > > A stdio implementation that uses aio_read and friends under the hood > might be interesting. > I think it just might be interesting. Thanks.