.. include:: ../../global.rst .. _`fd handles`: FD Handles ---------- FD handles don't exist *per se* but abstract the idea of file descriptor handles, ie. both file and pipe handles, giving a set of commands that work for either. You cannot open fd handles directly but must use a file or pipe handle creation method. FD Handle Predicates ^^^^^^^^^^^^^^^^^^^^ .. _`fd-handle?`: .. idio:function:: fd-handle? o test if `o` is a fd handle :param o: object to test :return: ``#t`` if `o` is a fd handle, ``#f`` otherwise .. _`input-fd-handle?`: .. idio:function:: input-fd-handle? o test if `o` is an input fd handle :param o: object to test :return: ``#t`` if `o` is an input fd handle, ``#f`` otherwise .. _`output-fd-handle?`: .. idio:function:: output-fd-handle? o test if `o` is an output fd handle :param o: object to test :return: ``#t`` if `o` is an output fd handle, ``#f`` otherwise FD Handle Attributes ^^^^^^^^^^^^^^^^^^^^ .. _`fd-handle-fd`: .. idio:function:: fd-handle-fd fdh return the file descriptor associated with fd handle `fdh` :param fdh: fd handle to query :type fdh: fd handle :return: file descriptor :rtype: C/int FD Handle Functions ^^^^^^^^^^^^^^^^^^^ .. _`close-fd-handle-on-exec`: .. idio:function:: close-fd-handle-on-exec fdh call :manpage:`fcntl(3)` on the C file descriptor associated with fd handle `fdh` with `F_SETFD` and `FD_CLOEXEC` arguments :param fdh: fd handle to cloexec :type fdh: fd handle :return: 0 :rtype: C/int :raises ^system-error: .. include:: ../../commit.rst