// UNSUPPORTED: linux, freebsd, solaris, darwin
Ah, it's already in NetBSD/, so it's fine.
Added assertions for fileno() returning -1.