getsockopt seems to be more particular about FDs and socket FDs on linux