Is is possible (in Ruby or in general) to create some kind of blackhole file like socket. But to allow write as to regular file echo "newline" >> my-fake-file.
I tried unix socket, but it fails to write into it. I don’t care about reading it, because all would be processed by running daemon. Best would be not to write into it at all.
Why I need it? I need to process logs written to file. And nginx allows only file logs (without patch).
To throw the data away completely, write to /dev/null.
To pass the data to another process you can use a named pipe. A named pipe is a special file that can be used for inter-process communication: data written by one process is read by another. See
man mkfifo.