2

I'm in Dired, and one of the files in the current directory is a named pipe (FIFO)

prw-r--r--+   1 ivan staff          0 Feb  6 11:13 some_pipe

If I (accidentally) visit it (with dired-visit-file), Emacs appears to freeze. This is not all that surprising, but I'm not sure what it's doing. I can break out of the frozen state by hammering on C-M-c (exit-recursive-edit) and C-g (keyboard-quit), though even that behaves inconsistently (sometimes it works after about 3 taps, sometimes it requires more, and a mix of both commands).

What I'd most like to know is what the expected behavior should be when a user tries to visit a FIFO, and maybe more importantly, how to prevent such accidental visitations.

  • Good question. Wrt the hanging, please consider filing an Emacs bug, assuming you see this also when starting Emacs with emacs -Q (no init file): M-x report-emacs-bug. – Drew May 8 '17 at 15:03
  • @Drew If I open the fifo with emacs -Q, I can hit C-g and the editor is available as normal. Must be something in my config. I'll investigate. I think I might try to add a confirmation prompt if the file we're attempting to visit is a fifo. – ivan May 8 '17 at 15:47
  • Recursively bisect your init file, by commenting out a region of text (M-x comment-region): first 1/2, then 3/4, 7/8, 15/16... – Drew May 8 '17 at 16:48
  • Emacs is trying to read from the fifo, which blocks unless someone also writes to it. Then it reports File exists, but cannot be read, at least for me. Not sure why the latter is the case. – MvG May 8 '17 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.