This fix previews window staying open after nnn exits, because they
inherited open FIFO (in write mode) from parent nnn process, and never
close it.
static void notify_fifo()
{
if (fifofd == -1) {
- fifofd = open(fifopath, O_WRONLY|O_NONBLOCK);
+ fifofd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC);
if (fifofd == -1) {
if (errno != ENXIO)
/* Unexpected error, the FIFO file might have been removed */