libc: select semantics

Only pass `fd_set` to client if there is an actual input set for it.

Issue #902