0 | module System.Posix.Pipe 1 | 2 | import System.Posix.Pipe.Prim as P 3 | 4 | import public System.Posix.Errno 5 | import public System.Posix.File 6 | 7 | %default total 8 | 9 | ||| Creates a pipe and writes the two file descriptors into the given C-array, 10 | ||| the read end at position 0 the write end at position 1. 11 | export %inline 12 | pipe : Has Errno es => EIO1 f => CArrayIO 2 Fd -> f es () 13 | pipe arr = elift1 (P.pipe arr) 14 | 15 | ||| Creates a new FIFO (named pipe) on disc. 16 | export %inline 17 | mkfifo : Has Errno es => EIO1 f => String -> ModeT -> f es () 18 | mkfifo s m = elift1 (P.mkfifo s m) 19 |