https://github.com/rontap/elteik-web/raw/main/teaching/opsys/materials/gy01/gy1-opsys.zip
gcc -Wall -Werror=vla -pthread -lrt -std=c11 -pedantic -o a.out ./open_fopen.c && ./a.out text.txt
OS/X-en pedig:
clang -Wall -Werror=vla -pthread -std=c11 -pedantic -o a.out ./open_fopen.c && ./a.out text.txt
Header | Mit csinál |
---|---|
#include <stdlib.h> |
rand, malloc, atoi, exit |
#include <stdio.h> |
feof, fopen, scanf, puts |
#include <string.h> |
strlen, strrchr, strtok |
#include <stdbool.h> |
bool típus |
Header | Mit csinál |
---|---|
#include <unistd.h> |
fork, rmdir util függvények |
#include <sys/wait.h> |
waitpid no windows |
#include <fcntl.h> |
File CoNTroL open, fcntl |
#include <sys/types.h> |
konstansok |
#include <sys/stat.h> |
File info |
rand.c
srand!fork.c
, Fork bomb, recursive forkrandom
write.c
atoi! -> system.c
-> exec.c
fcntl_0.c
fcntl.c