feat: update structure
This commit is contained in:
12
cs2106/labs/lab2/part2/lab2p2c.c
Normal file
12
cs2106/labs/lab2/part2/lab2p2c.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
int main() {
|
||||
if(fork() == 0) {
|
||||
execlp("cat", "cat", "file.txt", NULL);
|
||||
}
|
||||
else
|
||||
wait(NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user