bug-gnu-emacs
[Top][All Lists]
Advanced

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

Reading from a FIFO with insert-file-contents doesn't work.


From: Krzysztof Luks
Subject: Reading from a FIFO with insert-file-contents doesn't work.
Date: 25 Nov 2001 23:07:03 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-11-13 on raven, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes 
--with-x-toolkit=athena --without-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: pl_PL
  locale-coding-system: iso-latin-2
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Inserting contents of a fifo with either insert-file-contents or
insert-file-contents-literally fails. I created simple C program that
creates fifo '/tmp/test-fifo' writes string "Hello world\n" to that
file, closes it, sleeps 10 seconds and unlinks the fifo and exits.

---------------------------
#include <stdio.h>

#define FIFO "/tmp/test-fifo"

int main(void) {
    FILE *f;

    mkfifo(FIFO, 0666);
    f = fopen(FIFO, "w");
    fputs("Hello world\n", f);
    fclose(f);
    sleep(10);

    unlink(FIFO);
    return 0;
}
---------------------------

When I (while my test program is running) type into scratch buffer:
(insert-file-contents '/tmp/test-fifo')
and then type C-j Emacs just inserts one empty line and displays
'Quit' in the minibuffer.
Doing 'cat /tmp/test-fifo' in bash works as expected (i.e. produces
the line 'Hello world'.

Both insert-file-contents and insert-file-contents-literally also fail
with fifos created by other programs.

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <report-emacs-bug>

Recent messages:
Loading 50c-sig (source)...done
Loading 50dpkg-dev (source)...done
Loading 50eieio (source)...done
Loading 50gettext (source)...done
Loading 50octave (source)...done
Loading 50python-mode (source)...done
Loading 50speedbar (source)...done
Loading 50yatex-init (source)...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done

-- 
        --=(Krzysztof Luks)(m00se<at>iq.pl)=----=(mep.pl 0.0.6)=--
  You hit Root. Root hits you. Root sends you TERM signal. You barely
        survive. Root sends you KILL signal. You die. --more--



reply via email to

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