Software likes to do interesting things with file descriptors:
if (fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK) == -1) { wlr_log_errno(WLR_ERROR, "failed to set FD flags"); gamma_control_send_failed(gamma_control); goto error_fd; }
I'm not sure why you'd be worried about blocking when receiving shared memory — defense against pipes/sockets being maliciously sent, most likely — but this works just fine with unlinked temporary files and does not work with shm_open(SHM_ANON). Let's fix that.
(This patch will ignore nonblock and async on shm, mqueue, procdesc and sem — I hope that's not a problem, but I can create a special ioctl handler just for shm if refusing these flags is wanted for these other fd types.)