projects
/
akaros.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Syscalls now can take six arguments (XCC)
[akaros.git]
/
tests
/
fork.c
1
#include <stdlib.h>
2
#include <rstdio.h>
3
#include <unistd.h>
4
#include <sys/types.h>
5
#include <sys/wait.h>
6
7
int main(int argc, char** argv)
8
{
9
int status;
10
pid_t pid = 0;
11
pid = fork();
12
if (pid) {
13
printf("Hello world from parent!!\n");
14
waitpid(pid, &status, 0);
15
} else {
16
printf("Hello world from child!!\n");
17
printf("Child trying to exec Hello...\n");
18
execv("/bin/hello", argv);
19
}
20
return 0;
21
}