Unix Specific Services
**********************

The modules described in this chapter provide interfaces to features
that are unique to the Unix operating system, or in some cases to some
or many variants of it.  Here's an overview:

* "posix" --- The most common POSIX system calls

  * Large File Support

  * Notable Module Contents

    * "environ"

* "pwd" --- The password database

  * "getpwuid()"

  * "getpwnam()"

  * "getpwall()"

* "grp" --- The group database

  * "getgrgid()"

  * "getgrnam()"

  * "getgrall()"

* "termios" --- POSIX style tty control

  * "tcgetattr()"

  * "tcsetattr()"

    * "TCSANOW"

    * "TCSADRAIN"

    * "TCSAFLUSH"

  * "tcsendbreak()"

  * "tcdrain()"

  * "tcflush()"

  * "tcflow()"

  * "tcgetwinsize()"

  * "tcsetwinsize()"

  * Example

* "tty" --- Terminal control functions

  * "cfmakeraw()"

  * "cfmakecbreak()"

  * "setraw()"

  * "setcbreak()"

* "pty" --- Pseudo-terminal utilities

  * "fork()"

  * "openpty()"

  * "spawn()"

  * Example

* "fcntl" --- The "fcntl" and "ioctl" system calls

  * "fcntl()"

  * "ioctl()"

  * "flock()"

  * "lockf()"

    * "LOCK_UN"

    * "LOCK_SH"

    * "LOCK_EX"

    * "LOCK_NB"

* "resource" --- Resource usage information

  * "error"

  * Resource Limits

    * "RLIM_INFINITY"

    * "getrlimit()"

    * "setrlimit()"

    * "prlimit()"

    * "RLIMIT_CORE"

    * "RLIMIT_CPU"

    * "RLIMIT_FSIZE"

    * "RLIMIT_DATA"

    * "RLIMIT_STACK"

    * "RLIMIT_RSS"

    * "RLIMIT_NPROC"

    * "RLIMIT_NOFILE"

    * "RLIMIT_OFILE"

    * "RLIMIT_MEMLOCK"

    * "RLIMIT_VMEM"

    * "RLIMIT_AS"

    * "RLIMIT_MSGQUEUE"

    * "RLIMIT_NICE"

    * "RLIMIT_RTPRIO"

    * "RLIMIT_RTTIME"

    * "RLIMIT_SIGPENDING"

    * "RLIMIT_SBSIZE"

    * "RLIMIT_SWAP"

    * "RLIMIT_NPTS"

    * "RLIMIT_KQUEUES"

  * Resource Usage

    * "getrusage()"

    * "getpagesize()"

    * "RUSAGE_SELF"

    * "RUSAGE_CHILDREN"

    * "RUSAGE_BOTH"

    * "RUSAGE_THREAD"

* "syslog" --- Unix syslog library routines

  * "syslog()"

  * "openlog()"

  * "closelog()"

  * "setlogmask()"

  * "LOG_EMERG"

  * "LOG_ALERT"

  * "LOG_CRIT"

  * "LOG_ERR"

  * "LOG_WARNING"

  * "LOG_NOTICE"

  * "LOG_INFO"

  * "LOG_DEBUG"

  * "LOG_AUTH"

  * "LOG_AUTHPRIV"

  * "LOG_CRON"

  * "LOG_DAEMON"

  * "LOG_FTP"

  * "LOG_INSTALL"

  * "LOG_KERN"

  * "LOG_LAUNCHD"

  * "LOG_LPR"

  * "LOG_MAIL"

  * "LOG_NETINFO"

  * "LOG_NEWS"

  * "LOG_RAS"

  * "LOG_REMOTEAUTH"

  * "LOG_SYSLOG"

  * "LOG_USER"

  * "LOG_UUCP"

  * "LOG_LOCAL0"

  * "LOG_LOCAL1"

  * "LOG_LOCAL2"

  * "LOG_LOCAL3"

  * "LOG_LOCAL4"

  * "LOG_LOCAL5"

  * "LOG_LOCAL6"

  * "LOG_LOCAL7"

  * "LOG_PID"

  * "LOG_CONS"

  * "LOG_NDELAY"

  * "LOG_ODELAY"

  * "LOG_NOWAIT"

  * "LOG_PERROR"

  * Examples

    * Simple example
