[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: |
Brand Huntsman |
Subject: |
Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it |
Date: |
Wed, 15 May 2019 19:36:53 -0600 |
On Wed, 15 May 2019 20:45:49 +0200
Benno Schulenberg <address@hidden> wrote:
> > 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.
What about this new patch? It allows nano to be started before the FIFO has
data without hanging nano when someone accidentally opens a FIFO. The filename
should probably be displayed in the prompt, but I'm out of time today. I
originally set the filename early so it would appear in the titlebar, but that
can't be done when inserting into an existing buffer.
Also, after reading a FIFO into a new buffer, the cursor remains at top of
buffer. But the cursor moves to bottom of data when inserting a FIFO into an
existing buffer. I assume it treats the FIFO as a file and opening normal files
set cursor to top. Normal files save the cursor position when closing, but
FIFOs don't. A FIFO could be used to open an encrypted file, and position
history would be nice for that. Should FIFOs support position history or should
they move cursor to bottom like reading from stdin does?
terminal 1: mkfifo fifo ; nano fifo
terminal 2: echo 1 >> fifo
terminal 1: ^R to insert fifo into buffer
terminal 2: echo 2 >> fifo
0003-files-prompt-before-blocking-on-an-empty-FIFO.patch
Description: Text Data
- [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, 2019/05/15
- Re: [Nano-devel] [PATCH 3/3] files: check for an empty FIFO before blocking on it,
Brand Huntsman <=
- 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