pipe2(2) and fcntl(2) are missing a few features compared to NetBSD. Work around this