©2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SUS_Summary File Reference


Detailed Description

Summary of Standard UNIX Functions, Structures, and Unions.

This page summarizes the 307 functions, 38 structures, and 2 unions included in Advanced UNIX Programming, 2nd Edition.

Note that signal and sigset are listed as variables due to a parsing problem with Doxygen, which was used to generate this page.

Definition in file SUS_Summary.

Go to the source code of this file.

Compounds

struct  addrinfo
struct  aiocb
struct  dirent
struct  flock
struct  group
struct  hostent
struct  if_nameindex
struct  iovec
struct  ipc_perm
struct  itimerspec
struct  itimerval
struct  mq_attr
struct  msg
struct  msghdr
struct  msqid_ds
struct  netent
struct  passwd
struct  pollfd
struct  protoent
struct  rlimit
struct  rusage
struct  sembuf
struct  semid_ds
union  semun
struct  servent
struct  sigaction
struct  sigevent
struct  siginfo_t
union  sigval
struct  SimpleSem
struct  sockaddr_in
struct  sockaddr_in6
struct  sockaddr_un
struct  stat
struct  statvfs
struct  termios
struct  timespec
struct  timeval
struct  tm
struct  tms
struct  utimbuf

Functions

void FD_CLR (int fd, fd_set *fdset)
int FD_ISSET (int fd, fd_set *fdset)
void FD_SET (int fd, fd_set *fdset)
void FD_ZERO (fd_set *fdset)
void _Exit (int status)
void _exit (int status)
void _longjmp (jmp_buf loc_info, int val)
int _setjmp (jmp_buf loc_info)
void abort (void)
int accept (int socket_fd, struct sockaddr *sa, socklen_t *sa_len)
int access (const char *path, int what)
int aio_cancel (int fd, struct aiocb *aiocbp)
int aio_error (const struct aiocb *aiocbp)
int aio_fsync (int op, struct aiocb *aiocbp)
int aio_read (struct aiocb *aiocbp)
ssize_t aio_return (struct aiocb *aiocbp)
int aio_suspend (const struct aiocb *const list[], int cbcnt, const struct timespec *timeout)
int aio_write (struct aiocb *aiocbp)
unsigned alarm (unsigned secs)
char * asctime (const struct tm *tmbuf)
int atexit (void(*fcn)(void))
int bind (int socket_fd, const struct sockaddr *sa, socklen_t sa_len)
speed_t cfgetispeed (const struct termios *tp)
speed_t cfgetospeed (const struct termios *tp)
int cfsetispeed (struct termios *tp, speed_t speed)
int cfsetospeed (struct termios *tp, speed_t speed)
int chdir (const char *path)
int chmod (const char *path, mode_t mode)
int chown (const char *path, uid_t uid, gid_t gid)
int chroot (const char *path)
clock_t clock (void)
int clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
int clock_getres (clockid_t clock_id, struct timespec *res)
int clock_gettime (clockid_t clock_id, struct timespec *tp)
int clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *nsecs, struct timespec *remain)
int clock_settime (clockid_t clock_id, const struct timespec *tp)
int close (int fd)
int closedir (DIR *dirp)
size_t confstr (int name, char *buf, size_t len)
int connect (int socket_fd, const struct sockaddr *sa, socklen_t sa_len)
int creat (const char *path, mode_t perms)
char * ctermid (char *buf)
char * ctime (const time_t *t)
double difftime (time_t time1, time_t time0)
int dup (int fd)
int dup2 (int fd, int fd2)
void endhostent (void)
void endnetent (void)
void endprotoent (void)
void endservent (void)
int execl (const char *path, const char *arg0, const char *arg1,..., (char *)NULL)
int execle (const char *path, const char *arg0, const char *arg1,..., (char *)NULL, char *const envv[])
int execlp (const char *file, const char *arg0, const char *arg1,..., (char *)NULL)
int execv (const char *path, char *const argv[])
int execve (const char *path, char *const argv[], char *const envv[])
int execvp (const char *file, char *const argv[])
void exit (int status)
int fchdir (int fd)
int fchmod (int fd, mode_t mode)
int fchown (int fd, uid_t uid, gid_t gid)
int fcntl (int fd, int op,...)
int fdatasync (int fd)
pid_t fork (void)
long fpathconf (int fd, int name)
void freeaddrinfo (struct addrinfo *infop)
int fstat (int fd, struct stat *buf)
int fstatvfs (int fd, struct statvfs *buf)
int fsync (int fd)
key_t ftok (const char *path, int id)
int ftruncate (int fd, off_t length)
const char * gai_strerror (int code)
int getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hint, struct addrinfo **infop)
char * getcwd (char *buf, size_t bufsize)
tm * getdate (const char *s)
gid_t getegid (void)
char * getenv (const char *var)
uid_t geteuid (void)
gid_t getgid (void)
group * getgrgid (gid_t gid)
hostent * gethostbyaddr (const void *addr, socklen_t len, int family)
hostent * gethostbyname (const char *nodename,)
hostent * gethostent (void)
long gethostid (void)
int gethostname (char *name, size_t namelen)
int getitimer (int which, struct itimerval *val)
char * getlogin (void)
int getnameinfo (const struct sockaddr *sa, socklen_t sa_len, char *nodename, socklen_t nodelen, char *servname, socklen_t servlen, unsigned flags)
netent * getnetbyaddr (uint32_t net, int type)
netent * getnetbyname (const char *name)
netent * getnetent (void)
int getpeername (int socket_fd, struct sockaddr *sa, socklen_t *sa_len)
pid_t getpgid (pid_t pid)
pid_t getpid (void)
pid_t getppid (void)
protoent * getprotobyname (const char *name)
protoent * getprotobynumber (int proto)
protoent * getprotoent (void)
passwd * getpwuid (uid_t uid)
int getrlimit (int resource, struct rlimit *rlp)
int getrusage (int who, struct rusage *r_usage)
servent * getservbyname (const char *name, const char *proto)
servent * getservbyport (int port, const char *proto)
servent * getservent (void)
pid_t getsid (pid_t pid)
int getsockname (int socket_fd, struct sockaddr *sa, socklen_t *sa_len)
int getsockopt (int socket, int level, int option, const void *value, socklen_t *value_len)
int gettimeofday (struct timeval *tvalbuf, void *dummy)
uid_t getuid (void)
tm * gmtime (const time_t *t)
int grantpt (int fd)
uint32_t htonl (uint32_t hostnum)
uint16_t htons (uint16_t hostnum)
void if_freenameindex (struct if_nameindex *ptr)
char * if_indextoname (unsigned ifindex, char *ifname)
if_nameindex * if_nameindex (void)
unsigned if_nametoindex (const char *ifname)
in_addr_t inet_addr (const char *cp)
char * inet_ntoa (struct in_addr in)
const char * inet_ntop (int domain, const void *src, char *dst, socklen_t dst_len)
int inet_pton (int domain, const char *src, void *dst)
int ioctl (int fd, int req,...)
int isatty (int fd)
int kill (pid_t pid, int signum)
int killpg (pid_t pgrp, int signum)
int lchown (const char *path, uid_t uid, gid_t gid)
int link (const char *oldpath, const char *newpath)
int lio_listio (int mode, struct aiocb *const list[], int cbcnt, struct sigevent *sig)
int listen (int socket_fd, int backlog)
tm * localtime (const time_t *t)
int lockf (int fd, int op, off_t len)
void longjmp (jmp_buf loc_info, int val)
off_t lseek (int fd, off_t pos, int whence)
int lstat (const char *path, struct stat *buf)
int mkdir (const char *path, mode_t perms)
int mkfifo (const char *path, mode_t perms)
int mknod (const char *path, mode_t perms, dev_t dev)
int mkstemp (char *template)
time_t mktime (struct tm *tmbuf)
void * mmap (void *addr, size_t len, int prot, int flags, int fd, off_t off)
int mount (const char *source, const char *target, const char *type, unsigned long flags, const void *data)
int mq_close (mqd_t mqd)
int mq_getattr (mqd_t mqd, struct mq_attr *attr)
int mq_notify (mqd_t mqd, const struct sigevent *ep)
mqd_t mq_open (const char *name, int flags)
ssize_t mq_receive (mqd_t mqd, char *msg, size_t msgsize, unsigned *priorityp)
int mq_send (mqd_t mqd, const char *msg, size_t msgsize, unsigned priority)
int mq_setattr (mqd_t mqd, const struct mq_attr *attr, struct mq_attr *oldattr)
ssize_t mq_timedreceive (mqd_t mqd, char *msg, size_t msgsize, unsigned *priorityp const struct timespec *tmout)
int mq_timedsend (mqd_t mqd, const char *msg, size_t msgsize, unsigned priority const struct timespec *tmout)
int mq_unlink (const char *name)
int msgctl (int msqid, int cmd, struct msqid_ds *data)
int msgget (key_t key, int flags)
ssize_t msgrcv (int msqid, const void *msgp, size_t mtextsize, long msgtype, int flags)
int msgsnd (int msqid, const void *msgp, size_t msgsize, int flags)
int munmap (void *addr, size_t len)
int nanosleep (const struct timespec *nsecs, struct timespec *remain)
int nice (int incr)
uint32_t ntohl (uint32_t netnum)
uint16_t ntohs (uint16_t netnum)
int open (const char *path, int flags, mode_t perms)
DIR * opendir (const char *path)
long pathconf (const char *path, int name)
int pause (void)
int pipe (int pfd[2])
int poll (struct pollfd fdinfo[], nfds_t nfds, int timeout)
int posix_openpt (int oflag)
ssize_t pread (int fd, void *buf, size_t nbytes off_t offset)
int pselect (int nfds, fd_set *readset, fd_set *writeset, fd_set *errorset, const struct timespec *timeout, const sigset_t *sigmask)
int pthread_cancel (pthread_t thread_id)
void pthread_cleanup_pop (int execute)
void pthread_cleanup_push (void(*handler)(void *), void *arg)
int pthread_cond_signal (pthread_cond_t *cond)
int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
int pthread_create (pthread_t *thread_id, const pthread_attr_t *attr, void *(*start_fcn)(void *), void *arg)
int pthread_join (pthread_t thread_id, void **status_ptr)
int pthread_kill (pthread_t thread_id, int signum)
int pthread_mutex_lock (pthread_mutex_t *mutex)
int pthread_mutex_unlock (pthread_mutex_t *mutex)
int pthread_sigmask (int how, const sigset_t *set, sigset_t *oset)
void pthread_testcancel (void)
char * ptsname (int fd)
int putenv (char *string)
ssize_t pwrite (int fd, const void *buf, size_t nbytes off_t offset)
int raise (int signum)
ssize_t read (int fd, void *buf, size_t nbytes)
dirent * readdir (DIR *dirp)
int readdir_r (DIR *restrict dirp, struct dirent *entry, struct dirent **result)
ssize_t readlink (const char *path, char *buf, size_t bufsize)
ssize_t readv (int fd, const struct iovec *iov, int iovcnt)
ssize_t recv (int socket_fd, void *buffer, size_t length, int flags)
ssize_t recvfrom (int socket_fd, void *buffer, size_t length, int flags, struct sockaddr *sa, socklen_t *sa_len)
ssize_t recvmsg (int socket_fd, struct msghdr *message, int flags)
int rename (const char *oldpath, const char *newpath)
void rewinddir (DIR *dirp)
int rmdir (const char *path)
void seekdir (DIR *dirp, long loc)
int select (int nfds, fd_set *readset, fd_set *writeset, fd_set *errorset, struct timeval *timeout)
int sem_close (sem_t *sem)
int sem_destroy (sem_t *sem)
int sem_getvalue (sem_t *restrict sem, int *valuep)
int sem_init (sem_t *sem, int pshared, unsigned value)
sem_tsem_open (const char *name, int flags)
int sem_post (sem_t *sem)
int sem_timedwait (sem_t *restrict sem, const struct timespec *time)
int sem_trywait (sem_t *sem)
int sem_unlink (const char *name)
int sem_wait (sem_t *sem)
int semctl (int semid, int semnum, int cmd, union semun arg)
int semget (key_t key, int nsems, int flags)
int semop (int semid, struct sembuf *sops, size_t nsops)
ssize_t send (int socket_fd, const void *data, size_t length, int flags)
ssize_t sendmsg (int socket_fd, const struct msghdr *message, int flags)
ssize_t sendto (int socket_fd, const void *message, size_t length, int flags, const struct sockaddr *sa, socklen_t sa_len)
int setegid (gid_t gid)
int setenv (const char *var, const char *val, int overwrite)
int seteuid (uid_t uid)
int setgid (gid_t gid)
void sethostent (int stayopen)
int setitimer (int which, const struct itimerval *val, struct itimerval *oval)
int setjmp (jmp_buf loc_info)
void setnetent (int stayopen)
int setpgid (pid_t pid, pid_t pgid)
void setprotoent (int stayopen)
int setrlimit (int resource, const struct rlimit *rlp)
void setservent (int stayopen)
pid_t setsid (void)
int setsockopt (int socket_fd, int level, int option, const void *value, socklen_t value_len)
int setuid (uid_t uid)
int shm_open (const char *name, int flags, mode_t perms)
int shm_unlink (const char *name)
void * shmat (int shmid, const void *shmaddr, int flags)
int shmctl (int shmid, int cmd, struct shmid_ds *data)
int shmdt (const void *shmaddr)
int shmget (key_t key, size_t size, int flags)
int shutdown (int socket_fd, int how)
int sigaction (int signum, const struct sigaction *act, struct sigaction *oact)
int sigaddset (sigset_t *set, int signum)
int sigaltstack (const stack_t *stack, stack_t *ostack)
int sigdelset (sigset_t *set, int signum)
int sigemptyset (sigset_t *set)
int sigfillset (sigset_t *set)
int sighold (int signum,)
int sigignore (int signum,)
int siginterrupt (int signum, int flag)
int sigismember (const sigset_t *set, int signum)
void siglongjmp (sigjmp_buf loc_info, int val)
int sigpause (int signum,)
int sigpending (sigset_t *set)
int sigprocmask (int how, const sigset_t *set, sigset_t *oset)
int sigqueue (pid_t pid, int signum, const union sigval value)
int sigrelse (int signum,)
int sigsetjmp (sigjmp_buf loc_info, int savemask)
int sigsuspend (const sigset_t *sigmask)
int sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *ts)
int sigwait (const sigset_t *set, int *signum)
int sigwaitinfo (const sigset_t *set, siginfo_t *info)
unsigned sleep (unsigned secs)
int sockatmark (int socket_fd,)
int socket (int domain, int type, int protocol)
int socketpair (int domain, int type, int protocol int socket_vector[2])
int stat (const char *path, struct stat *buf)
int statvfs (const char *path struct statvfs *buf)
size_t strftime (char *buf, size_t bufsize, const char *format, const struct tm *tmbuf)
char * strptime (const char *s, const char *format, struct tm *tmbuf)
int symlink (const char *oldpath, const char *newpath)
void sync (void)
long sysconf (int name)
int system (const char *command)
int tcdrain (int fd)
int tcflow (int fd, int action)
int tcflush (int fd, int queue)
int tcgetattr (int fd, struct termios *tp)
pid_t tcgetpgrp (int fd)
pid_t tcgetsid (int fd)
int tcsendbreak (int fd, int duration)
int tcsetattr (int fd, int actions, const struct termios *tp)
int tcsetpgrp (int fd, pid_t pgid)
long telldir (DIR *dirp)
time_t time (time_t *t)
int timer_create (clockid_t clockid, struct sigevent *sig, timer_t *timer_id)
int timer_delete (timer_t timer_id)
int timer_getoverrun (timer_t timer_id)
int timer_gettime (timer_t timer_id, struct itimerspec *val)
int timer_settime (timer_t timer_id, int flags, const struct itimerspec *val, struct itimerspec *oval)
clock_t times (struct tms *buffer)
int truncate (const char *path, off_t length)
char * ttyname (int fd)
int ttyname_r (int fd, char *buf, size_t bufsize)
void tzset (void)
long ulimit (int cmd,...)
mode_t umask (mode_t cmask)
int umount (const char *target)
int uname (struct utsname *name)
int unlink (const char *path)
int unlockpt (int fd)
int unsetenv (const char *var)
int usleep (useconds_t usecs)
int utime (const char *path, const struct utimbuf *timbuf)
pid_t vfork (void)
pid_t wait (int *statusp,)
int waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
pid_t waitpid (pid_t pid, int *statusp, int options)
size_t wcsftime (wchar_t *buf, size_t bufsize, const wchar_t *format, const struct tm *tmbuf)
ssize_t write (int fd, const void *buf, size_t nbytes)
ssize_t writev (int fd, const struct iovec *iov, int iovcnt)

Variables

void(*)(int) signal (int signum, void(*act)(int))
void(*)(int) sigset (int signum, void(*act)(int))
int daylight
long timezone
char * tzname [2]


Function Documentation

void _exit int  status  ) 
 

Description:
Terminate process without clean-up (Std. UNIX; see AUP2 Sec. 5.7)
Headers:
unistd.h
Returns:
Does not return
Parameters:
status  exit status

Referenced by edinvoke(), execute3(), fcn(), fd_check(), handler(), invoke(), main(), redirect(), and sig_thread().

void _Exit int  status  ) 
 

Description:
Terminate process without clean-up (Std. UNIX; see AUP2 Sec. 5.7)
Headers:
stdlib.h
Returns:
Does not return
Parameters:
status  exit status

void _longjmp jmp_buf  loc_info,
int  val
 

Description:
Jump to jump point without restoring signal mask (Std. UNIX; see AUP2 Sec. 9.6)
Headers:
setjmp.h
Parameters:
loc_info  saved location information
val  value for setjmp to return

int _setjmp jmp_buf  loc_info  ) 
 

Description:
Set jump point (Std. UNIX; see AUP2 Sec. 9.6)
Headers:
setjmp.h
Returns:
0 if called directly, non-zero if from longjmp (no error return)
Parameters:
loc_info  saved location information

void abort void   ) 
 

Description:
Generate SIGABRT (Std. UNIX; see AUP2 Sec. 9.1.9)
Headers:
stdlib.h
Returns:
Does not return

int accept int  socket_fd,
struct sockaddr *  sa,
socklen_t *  sa_len
 

Description:
Accept new connection on socket and create new socket (Std. UNIX; see AUP2 Sec. 8.1.2)
Headers:
sys/socket.h
Returns:
file descriptor or -1 on error (sets errno)
Parameters:
socket_fd  socket file descriptor
sa  socket address or NULL
sa_len  address length

Referenced by main(), run_server(), and ssi_wait_server().

int access const char *  path,
int  what
 

Description:
Determine accessibility of file (Std. UNIX; see AUP2 Sec. 3.8.1)
R_OK read permission
W_OK write permission
X_OK execute (search) permission
F_OK test for existence
Headers:
unistd.h
Returns:
0 if allowed or -1 if not or on error (sets errno)
Parameters:
path  pathname
what  permission to be tested

Referenced by access_test(), find_and_open_master(), and main().

int aio_cancel int  fd,
struct aiocb aiocbp
 

Description:
Cancel asynchronous I/O request (Std. UNIX; see AUP2 Sec. 3.9.5)
Headers:
aio.h
Returns:
result code or -1 on error (sets errno)
Parameters:
fd  file descriptor
aiocbp  control block

int aio_error const struct aiocb aiocbp  ) 
 

Description:
Retrieve error status for asynchronous I/O operation (Std. UNIX; see AUP2 Sec. 3.9.4)
Headers:
aio.h
Returns:
0, errno value, or EINPROGRESS (does not set errno)
Parameters:
aiocbp  control block

Referenced by asynchronous(), and Ux::Aio::error().

int aio_fsync int  op,
struct aiocb aiocbp
 

Description:
Initiate buffer-cache flushing for one file (Std. UNIX; see AUP2 Sec. 3.9.6)
Headers:
aio.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
op  O_SYNC or O_DSYNC
aiocbp  control block

int aio_read struct aiocb aiocbp  ) 
 

Description:
Asynchronous read from file (Std. UNIX; see AUP2 Sec. 3.9.3)
Headers:
aio.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
aiocbp  control block

Referenced by asynchronous().

ssize_t aio_return struct aiocb aiocbp  ) 
 

Description:
Retrieve return status of asynchronous I/O operation (Std. UNIX; see AUP2 Sec. 3.9.4)
Headers:
aio.h
Returns:
operation return value or -1 on error (sets errno)
Parameters:
aiocbp  control block

int aio_suspend const struct aiocb *const  list[],
int  cbcnt,
const struct timespec timeout
 

Description:
Wait for asynchronous I/O request (Std. UNIX; see AUP2 Sec. 3.9.7)
Headers:
aio.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
list  array of control blocks
cbcnt  number of elements in array
timeout  max time to wait

Referenced by asynchronous().

int aio_write struct aiocb aiocbp  ) 
 

Description:
Asynchronous write to file (Std. UNIX; see AUP2 Sec. 3.9.3)
Headers:
aio.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
aiocbp  control block

unsigned alarm unsigned  secs  ) 
 

Description:
Schedule an alarm signal (Std. UNIX; see AUP2 Sec. 9.7.1)
Headers:
unistd.h
Returns:
seconds left on previous alarm or zero if none (no error return)
Parameters:
secs  seconds until signal

Referenced by Ux::Timer::alarm(), aup_sleep(), main(), posixsem_test(), and sysvsem_test().

char* asctime const struct tm tmbuf  ) 
 

Description:
Convert broken-down time to local-time string (Std. UNIX; see AUP2 Sec. 1.7.1)
Headers:
time.h
Returns:
string or NULL on error (errno not set)
Parameters:
tmbuf  broken-down time

int atexit void(*  fcn)(void)  ) 
 

Description:
Register function to be called when process exits (Std. UNIX; see AUP2 Sec. 1.3.4)
Headers:
stdlib.h
Returns:
0 on success, non-zero on error (errno not set)
Parameters:
fcn  function to be called

Referenced by ec_push(), and process_test().

int bind int  socket_fd,
const struct sockaddr *  sa,
socklen_t  sa_len
 

Description:
Bind name to socket (Std. UNIX; see AUP2 Sec. 8.1.2)
Headers:
sys/socket.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
socket_fd  socket file descriptor
sa  socket address
sa_len  address length

Referenced by main(), run_client(), run_server(), and ssi_open().

speed_t cfgetispeed const struct termios tp  ) 
 

Description:
Get input speed from termios structure (Std. UNIX; see AUP2 Sec. 4.5.3)
Headers:
termios.h
Returns:
speed (no error return)
Parameters:
tp  attributes

Referenced by Ux::Termios::cfgetispeed().

speed_t cfgetospeed const struct termios tp  ) 
 

Description:
Get output speed from termios structure (Std. UNIX; see AUP2 Sec. 4.5.3)
Headers:
termios.h
Returns:
speed (no error return)
Parameters:
tp  attributes

Referenced by Ux::Termios::cfgetospeed().

int cfsetispeed struct termios tp,
speed_t  speed
 

Description:
Set input speed in termios structure (Std. UNIX; see AUP2 Sec. 4.5.3)
Headers:
termios.h
Returns:
0 on success or -1 on error (may set errno)
Parameters:
tp  attributes
speed  speed

int cfsetospeed struct termios tp,
speed_t  speed
 

Description:
Set output speed in termios structure (Std. UNIX; see AUP2 Sec. 4.5.3)
Headers:
termios.h
Returns:
0 on success or -1 on error (may set errno)
Parameters:
tp  attributes
speed  speed

int chdir const char *  path  ) 
 

Description:
Change current directory by path (Std. UNIX; see AUP2 Sec. 3.6.2)
Headers:
unistd.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
path  pathname

Referenced by builtin(), do_dir(), getcwdx(), main(), and process_test().

int chmod const char *  path,
mode_t  mode
 

Description:
Change mode of file by path (Std. UNIX; see AUP2 Sec. 3.7.1)
Headers:
sys/stat.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
path  pathname
mode  new mode

int chown const char *  path,
uid_t  uid,
gid_t  gid
 

Description:
Change owner and group of file by path (Std. UNIX; see AUP2 Sec. 3.7.2)
Headers:
unistd.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
path  pathname
uid  new user ID
gid  new group ID

int chroot const char *  path  ) 
 

Description:
Change root directory (Std. UNIX; see AUP2 Sec. 5.14)
Headers:
unistd.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
path  path name

Referenced by process_test().

clock_t clock void   ) 
 

Description:
Get execution time (Std. UNIX; see AUP2 Sec. 1.7.2)
Headers:
time.h
Returns:
time in CLOCKS_PER_SEC or -1 on error (errno not set)

Referenced by Ux::RealtimeTimer::create(), getaddr(), Ux::Clock::getcpuclockid(), and main().

int clock_getcpuclockid pid_t  pid,
clockid_t *  clock_id
 

Description:
Get process CPU-time clock (Std. UNIX; see AUP2 Sec. 9.7.5)
Headers:
time.h
Returns:
0 on success or error number on error
Parameters:
pid  process ID
clock_id  returned clock ID

int clock_getres clockid_t  clock_id,
struct timespec res
 

Description:
Get clock resolution (Std. UNIX; see AUP2 Sec. 9.7.5)
Headers:
time.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
clock_id  clock ID
res  resolution

int clock_gettime clockid_t  clock_id,
struct timespec tp
 

Description:
Get time from clock (Std. UNIX; see AUP2 Sec. 9.7.5)
Headers:
time.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
clock_id  clock ID (CLOCK_REALTIME, etc.)
tp  time

int clock_nanosleep clockid_t  clock_id,
int  flags,
const struct timespec nsecs,
struct timespec remain
 

Description:
Suspend execution for nanoseconds or until signal (Std. UNIX; see AUP2 Sec. 9.7.5)
Headers:
time.h
Returns:
0 on success or error number on error
Parameters:
clock_id  clock ID
flags  TIMER_ABSTIME or zero
nsecs  nanoseconds to sleep
remain  remaining time

int clock_settime clockid_t  clock_id,
const struct timespec tp
 

Description:
Set clock (Std. UNIX; see AUP2 Sec. 9.7.5)
Headers:
time.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
clock_id  clock ID
tp  time

int close int  fd  ) 
 

Description:
Close file descriptor (Std. UNIX; see AUP2 Sec. 2.11)
Headers:
unistd.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
fd  file descriptor

Referenced by backward(), backward0(), backward2(), Bclose(), clients_close_all(), copy(), copy2(), copy2a(), do_dir(), edinvoke(), ev_close(), exec_redirected(), fcn(), fcntl_example(), file_ctime_test(), find_and_open_master(), fsort(), fsort0(), ftruncate_test(), getaddr(), getcwdx(), invoke(), junk(), lock(), main(), main1(), pcsync_end(), pipewrite(), pipewrite2(), pipewrite2bug(), process1(), process2(), pt_close_master(), pt_close_slave(), pt_open_master(), pt_open_slave(), pwrite_test(), readany_test(), readany_test2(), readany_test3(), redirect(), rmdir_test(), run_client(),