Dear list Should musl’s fdopen() verify whether the passed file descriptor refers to an open file? glibc seems to do that, whereas musl doesn’t. According to the spec, fdopen "may" fail with EBADF if a bad file descriptor is passed. https://pubs.opengroup.org/onlinepubs/009696899/functions/fdopen.html I just ran into this difference while porting some user library (libosmium, for OpenStreetMap) to Alpine Linux which uses musl. For now I’m patching the user library so it tests for fcntl(fd, F_GETFD) < 0 before invoking fdopen(). But I wonder if this check shouldn’t rather be done within musl itself. What do you think? Thanks for cc’ing me on your thoughts, I’m not subscribed to the musl mailing list. Best, — Sascha Brawer, sascha@brawer.ch