libc.a
library provides functions that allow
the entry points into the kernel to be accessed just like local
functions.
access
:
checks if calling process has file access
alarm
:
sets a process's alarm clock
chdir
:
changes the working directory
chmod
:
changes the mode of a file
chown
:
changes the ownership of a file
chroot
:
changes the root directory
close
:
closes a file descriptor
dup
, dup2
:
duplicates an open file descriptor
execl
, execv
, execle
,
execve
, execlp
, execvp
:
executes a file
exit
:
exits a process
fcntl
:
controls open files
fork
:
creates a new process
getpid
, getpgrp
, getppid
:
gets group and process IDs
getuid
, geteuid
, getgid
,
getegid
:
gets user and group IDs
ioctl
:
controls character devices
kill
:
sends a signal to one or more processes
link
:
links a new file name to an existing file
lseek
:
moves read/write file pointer
mknod
:
makes a directory, special or ordinary file
mount
:
mounts a filesystem
msgctl
, msgget
, msgsnd
,
msgrcv
:
message passing support
nice
:
changes priority of a process
open
:
opens a file for reading or writing
pause
:
suspends a process until a signal occurs
pipe
:
creates an interprocess pipe
plock
:
locks a process in memory
profil
:
requests an execution profile
ptrace
:
allows a process to trace the execution of another
read
:
reads from a file
semctl
, semget
, semop
:
semaphore support
setpgrp
:
sets process group ID
setuid
, setgid
:
sets user and group IDs
shmctl
, shmget
, shmop
:
shared memory support
signal
:
control of signal processing
sleep
:
suspends execution for an interval
stat
, fstat
:
gets file status
stime
:
sets the time
sync
:
updates the super block
time
:
number of seconds since 1/1/1970
times
:
gets process and child process times
ulimit
:
gets and sets user limits
umask
:
gets and sets file creation mask
umount
:
unmounts a file system
uname
:
gets system information
unlink
:
removes directory entry
ustat
:
gets file system statistics
utime
:
sets file access and modification times
wait
:
waits for a child process to stop or terminate
write
:
writes to a file
errno
.
void perror(char *user_message)
Exercises
nice()
system call.
Print out the resultant error number and associated error message.
Exam Style Questions