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 callspwd
— The password databasegrp
— The group databasetermios
— POSIX style tty controltty
— Terminal control functionspty
— Pseudo-terminal utilitiesfcntl
— Thefcntl
andioctl
system callsresource
— Resource usage informationerror
- 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
syslog
— Unix syslog library routinessyslog()
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