Is there a device file that just blocks?

Solution 1:

You can create a named pipe (fifo) using mkfifo. Writes to this type of special file will block until a process reads from it.

$ mkfifo blocker
$ echo hello > blocker # "hangs"

In another session:

$ cat blocker
hello                  # the `echo` above unblocks after this