add missing tests/basic and tests/fork
[ust.git] / tests / fork / fork.c
1 #include <stdio.h>
2 #include <unistd.h>
3
4 #include "marker.h"
5
6
7 int main()
8 {
9 int result;
10
11 printf("Fork test program\n");
12 trace_mark(ust, before_fork, MARK_NOARGS);
13
14 sleep(5);
15
16 result = fork();
17 if(result == -1) {
18 perror("fork");
19 return 1;
20 }
21 if(result == 0) {
22 trace_mark(ust, after_fork_child, MARK_NOARGS);
23 }
24 else {
25 trace_mark(ust, after_fork_parent, MARK_NOARGS);
26 }
27
28 return 0;
29 }
30
31 MARKER_LIB;
This page took 0.02888 seconds and 4 git commands to generate.