Reorganize the codebase

This commit is contained in:
Jianfeng Jiang
2023-04-09 23:12:42 -04:00
committed by Tate, Hongliang Tian
parent 888853a6de
commit 271a16d492
416 changed files with 67 additions and 53 deletions

View File

@ -0,0 +1,10 @@
.PHONY: build clean run
build: fork.c
@gcc -static fork.c -o fork
clean:
@rm fork
run: build
@./fork

3
regression/apps/fork_c/fork Executable file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca7a77a72da160f11670a04a16b623944295b9059399da45f57668f121b00d11
size 877152

View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <unistd.h>
int main() {
printf("before fork\n");
fflush(stdout);
if(fork() == 0) {
printf("after fork: Hello from child\n");
} else {
printf("after fork: Hello from parent\n");
}
fflush(stdout);
return 0;
}