Several procedures return their results as Scheme records. All record types defined by the UNIX extension are stored in variables with names of the form <something>-record (such as system-record or passwd-record). In addition, a type predicate, a record constructor, and accessor functions for all record fields are defined for each record type. For example, a system record type with the fields hostname, sysname, and osname is defined, resulting in variable system-record holding the record type descriptor, and the functions
(system-record? obj) (make-system-record) (system-hostname system-record) (system-sysname system-record) (system-osname system-record)
The following
record types are defined by the UNIX extension:
+------------+--------------------------------------------------------+ |Record Type | Fields | +------------+--------------------------------------------------------+ +------------+--------------------------------------------------------+ |stat | type mode ino dev nlink uid gid size atime mtime ctime | +------------+--------------------------------------------------------+ |time | seconds minutes hours day-of-month month year weekday | | | day-of-year dst | +------------+--------------------------------------------------------+ |nanotime | nanoseconds minuteswest dst | +------------+--------------------------------------------------------+ |system | hostname sysname osname | +------------+--------------------------------------------------------+ |passwd | name password uid gid gecos homedir shell | +------------+--------------------------------------------------------+ |group | name password gid members | +------------+--------------------------------------------------------+ |resources | user-time system-time (...) | +------------+--------------------------------------------------------+ |lock | exclusive? whence start length | +------------+--------------------------------------------------------+ |wait | pid status code core-dump? resources | +------------+--------------------------------------------------------+