emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: insert-file-contents and fifos


From: Vivek
Subject: Re: insert-file-contents and fifos
Date: Sun, 5 May 2002 13:14:26 +0100 (BST)

On Sat, 4 May 2002, Richard Stallman wrote:

> I don't really know how to use fifos, so I can't make a test case.
> Can you send a specific test case with which to observe this problem?

The attached perl script, when run, will create a fifo called .sig-dyn,
daemonise, and sit attached to it, emitting a signature each time
.sig-dyn is read from. If ~/sigd/sigfile (I do means "sigd", it's not a
typo) is not present, then it uses fortune(6) as a source.

GNU emacs 20 was capable of reading from this, 21 is not. The change
appears to be the introduction of the new read_non_regular function
in fileio.c : a strace shows emacs fetching the data from the file
( you can see the data being read ), and then aborting. Presumably
the state of a fifo is sufficiently different from a non-regular file
that read_non_regular reacts as if an error has occurred.

There is a (possibly architecturally bad) patch on savannah.gnu.org
that restores the old GNU emacs 20 behaviour specifically for fifos,
while leaving all other file types to the new code. The patch is
against the version of GNU emacs 21.1 (21.1-7) shipped with Debian
GNU/Linux (woody) a while ago now - woody ships with 21.2-1 now.

If there are any problems with getting the sigerator working, let me know.
( It should be pretty straightforward, I usually run it from my home
  directory, but it should be Ok anywhere it has write permission ).

Attachment: sigerator
Description: Text document

Attachment: sigfile
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]