chap3
This commit is contained in:
14
bac2/os/chap3/ex2.c
Normal file
14
bac2/os/chap3/ex2.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define printvi(X) printf("%s = %d\n", #X, X);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printvi(getpid());
|
||||
|
||||
pid_t f = fork();
|
||||
if(f != 0)
|
||||
getchar();
|
||||
}
|
||||
|
Reference in New Issue
Block a user