Fifo file in linux

Is there any way to create a fifo other than creating a process with mkfifo in Crystal?

RTFM

https://crystal-lang.org/api/0.27.0/UNIXSocket.html

Unix sockets & fifo (named pipes) are not exactly the same, what’s your use-case?

(see https://unix.stackexchange.com/questions/75904/are-fifo-pipe-unix-domain-socket-the-same-thing-in-linux-kernel)

1 Like

Oh, it’s true!

And then, any shard to handle fifo pipes?

I think there should be mkfifo bindings in the stdlib. LibC.mkfifo exists, but there should be a high-level wrapper since LibC is an implementation detail.

I’m late to the party but just made a small shard to support this: mkfifo.cr.

And I also found fifo.cr on CrystalShards.org which is a great alternative. (It’s not on https://shardbox.org or https://shards.info … and I have no idea why or how these sites all work :person_shrugging:)