def _setup_fd(fd):
<EOL>flags = fcntl.fcntl(fd, fcntl.F_GETFL)<EOL>fcntl.fcntl(fd, fcntl.F_SETFL, flags | os.O_NONBLOCK)<EOL>set_buf_size(fd)<EOL>
Common set-up code for initializing a (pipe) file descriptor