Week 4 - Processes and Low Level I/O Flashcards
1
Q
What library is syscall in?
A
unistd.h
2
Q
What library is fopen in?
A
stdio.h
3
Q
What library is fork in?
A
unistd.h
4
Q
What library is exit in?
A
stdlib.h
5
Q
What library is printf in?
A
stdio.h
6
Q
What library is get_pid in?
A
unistd.h
7
Q
What library is sleep in?
A
unistd.h
8
Q
What library is wait in?
A
sys/wait.h
9
Q
What is SYSNO?
A
the system call number
10
Q
How do you make a direct syscall?
A
long int syscall( long int SYSNO, …)
11
Q
How do you create a new child?
A
pid_t fork();
12
Q
What number is the standard input?
A
0
13
Q
What number is the standard output?
A
1
14
Q
What number is the standard error?
A
2
15
Q
How does the parent wait for the child to terminate?
A
pid_t wait(int *status);