[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before block
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it |
Date: |
Wed, 15 May 2019 20:45:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Op 14-05-19 om 07:59 schreef Brand Huntsman:
> The open() in open_file() blocks if an empty FIFO is opened, causing nano to
> hang.
Strange... I remember seeing a "Reading File" message while it was waiting
for data to appear. But obviously I must be misremembering that.
> This patch opens the FIFO in non-blocking mode, polls it for data and
> re-opens it in blocking mode if data found. Just start the writing process
> first, and then open nano.
I want it to be possible to open nano before the writing process has started.
When a FIFO is used, the result shouldn't depend on the particular order of
starting things.
> It would also be nice if a "Writing to FIFO..." message was displayed before
> writing to one.
Yes, that is a good idea. And "Reading from FIFO..." could be shown before
the open() is called.
> It would provide a little feedback as to why nano hangs if the FIFO is no
> longer listening.
Or not yet listening.
Benno
signature.asc
Description: OpenPGP digital signature
- [Nano-devel] [PATCH 1/2] files: allow a given file to be a special file but not a directory, Benno Schulenberg, 2019/05/12
- [Nano-devel] [PATCH 2/2] files: check for writability by the access bits, not by trying to append, Benno Schulenberg, 2019/05/12
- [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it, Brand Huntsman, 2019/05/14
- Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it,
Benno Schulenberg <=
- Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it, Brand Huntsman, 2019/05/15
- Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it, Benno Schulenberg, 2019/05/16
- Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it, Brand Huntsman, 2019/05/17
- [Nano-devel] interrupting an open() does not work with gcc, Benno Schulenberg, 2019/05/23
- Re: [Nano-devel] interrupting an open() does not work with gcc, Benno Schulenberg, 2019/05/23
- Re: [Nano-devel] interrupting an open() does not work with gcc, Brand Huntsman, 2019/05/23
- Re: [Nano-devel] interrupting an open() does work with gcc when flags are zeroed, Benno Schulenberg, 2019/05/23