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¶
- 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
- 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
- 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¶
- 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¶
- function close-fd-handle-on-exec fdh¶
call 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:
Last built at 2025-02-05T07:10:41Z+0000 from 62cca4c (dev) for Idio 0.3.b.6