Next: posix resources, Previous: posix timers, Up: posix [Index]
The following bindings are exported by the (vicare posix)
library. If an error occurs: all the following functions raise an
exception with condition components &errno
,
&error
, &who
, &message
,
&irritants
.
Interface to the C function sysconf()
, (libc)sysconf. Query the system for a configuration value
selected by the exact integer parameter among the _SC_
constants. If successful and a value is available: return a positive
exact integer; if successful but no value is available return false; if
parameter is invalid raise an exception.
NOTE This function assumes that all the validly returnable values are non–negative. If a value is negative, the behaviour is unspecified.
Interface to the C function pathconf()
, (libc)pathconf. Query the system for a configuration value associated to the
file pathname selected by the exact integer parameter among
the _PC_
constants.
pathname must be a string or bytevector; if it is a string: it is
converted to bytevector with the function referenced by
string->filename-func
.
If successful and a value is available: return a positive exact integer; if successful but no value is available return false; if parameter is invalid raise an exception.
NOTE This function assumes that all the validly returnable values are non–negative. If a value is negative, the behaviour is unspecified.
Interface to the C function fpathconf()
, (libc)fpathconf. Query the system for a configuration value associated to
the file descriptor fd selected by the exact integer
parameter among the _PC_
constants.
If successful and a value is available: return a positive exact integer; if successful but no value is available return false; if parameter is invalid raise an exception.
NOTE This function assumes that all the validly returnable values are non–negative. If a value is negative, the behaviour is unspecified.
Interface to the C function confstr()
, (libc)confstr. Query the system for a configuration value
selected by the exact integer parameter among the _CS_
constants. If successful confstr
returns a bytevector
representing the value, confstr/string
returns a string
representing the value; else an exception is raised.
#!r6rs (import (rnrs) (prefix (vicare posix) px.) (vicare platform constants)) (px.confstr/string _CS_PATH) ⇒ "/bin:/usr/bin"
Next: posix resources, Previous: posix timers, Up: posix [Index]