This makes me happy. I don't think I've actually seen any of this stuff handled right. Not to mention that close() itself is basically broken in multi-threaded scenarios on Linux (Linus says to basically "just not worry about it" if you get EINTR, which may or may not have succeeded, and then the FD entry taken by another thread).
What I would welcome, is a function that says "glib, close all FDs you know about or that you created". If all the libraries did that, at least it would be possible for applications to maybe, sorta, do the right thing. (That would push the synchronization responsibility during fork()/exec() to the application).