Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to come back from the pipe file?

Tags:

linux

vim

fifo

Using a mkfifo command we can create our pipe file. After that, I just opened that file using a vim editor.

  mkfifo pipe_file

  vim pipe_file

But i can't come back to my terminal, How can I comeback to terminal?

like image 720
Bhuvanesh Avatar asked Jan 19 '15 09:01

Bhuvanesh


1 Answers

First of all, a FIFO is a blocking IO. A process blocks on reading a FIFO, that is, when you issue vim somefifo, the vim process waits until another process opens the somefifo for writing.

So you can try another process, e.g., issue echo "foo">somefifo in a new terminal, then you can do normal operation in your vim process, like ZQ to quit.

like image 55
Kent Avatar answered Oct 20 '22 06:10

Kent