


posix(n)                  STk procedures                 posix(n)


NAME
       posix  - Access to posix functions

SYNOPSIS
       ERROR MANAGEMENT
              *errno* (posix-perror str)

       FILES AND DIRECTORIES
              (posix-stat  filename)  (posix-stat->vector descr) (posix-access
              filename mode) (posix-pipe)

       TIME FUNCTIONS
              (posix-time)  (posix-asctime)  (posix-asctime  seconds)  (posix-
              ctime)  (posix-ctime seconds) (posix-localtime  seconds) (posix-
              gmtime  seconds)  (posix-mktime  time)  (posix-tm->vector  time)
              (vector->posix-tm  vect) (posix-strftime format) (posix-strftime
              format time)

       PROCESSES FUNCTIONS
              (posix-fork) (posix-wait)

       SYSTEM INFORMATIONS
              (posix-uname) (posix-host) (posix-domain)


DESCRIPTION
       The functions of the posix library must  be  loaded  before  use  with:
       (require  "posix") The functions will not be described here completely.
       For full details about a functions and its behaviour, look at the  cor-
       responding Unix manual page or to the POSIX.1 document.


       ERROR MANAGEMENT


       *errno*
              is  a  variable  which  always contains the error number of last
              encountered error. It is equivalent to the errno  POSIX.1  vari-
              able.

       (posix-perror str)
              produces  a message on the standard error output, describing the
              last
               error encountered during a call to a system  or  library  func-
              tion.  The  str parameter is an identifying string which will be
              printed before the error message.  See perror(3).


       FILES AND DIRECTORIES


       (posix-stat filename)
              returns a C structure which contains a description of filename).
              This   structure   is   not  viewable  by  itself.  Use,  posix-



STk                            3.1                              1





posix(n)                  STk procedures                 posix(n)


              stat->vector to access its content in  Scheme.If  filename  does
              not exists, this procedure returns #f.

       (posix-stat->vector descr)
              transforms a file description sructure obtained by posix-stat to
              a Scheme vector. The components of the  vector  are  given  here
              with their index:
                 st_dev   (0)          st_ino    (1)
                 st_mode  (2)          st_nlink  (3)
                 st_uid   (4)          st_gid    (5)
                 st_size  (6)          st_atime  (7)
                 st_mtime  (8)          st_ctime  (9) See fstat(2) for details
              on the semantic of this fields.

       (posix-access filename mode)
              checks whether the interpreter is  allowed to read, write,  exe-
              cute  or test for existence of filename. Mode must be one of the
              following constants: |R_OK|, |W_OK|, |X_OK| or |F_OK|.  If file-
              name does not exit, this function returns #f.  See access(2) for
              details.

       (posix-pipe)
              returns a pair of Scheme ports associated to a pipe inode. If  a
              pipe cannot be created, this function returns #f.


       TO BE CONTINUED






























STk                            3.1                              2


