fifo(7) says
Under Linux, opening a FIFO for read and write will succeed both
in blocking and nonblocking mode. POSIX leaves this behavior
undefined. This can be used to open a FIFO for writing while
there are no readers available.
When a process tries to write to a FIFO that is not opened for
read on the other side, the process is sent a SIGPIPE signal.
but ... that doesn't match what I saw, which was that it carried on
writing until the buffer filled and then it blocked or returned -1
(depending on O_NONBLOCK)
Switch to opening O_WRONLY | O_NONBLOCK and retrying periodically
if it fails