Sets the file descriptor fd into non-blocking mode and returns a writer which is used to read input from fd.