update build system to find automatically installed kcompat and urcu
[lttng-ust.git] / tests / fork / fork.c
CommitLineData
48c56fcf
PMF
1#include <stdio.h>
2#include <unistd.h>
3
4#include "marker.h"
5
6
7int 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
31MARKER_LIB;
This page took 0.02575 seconds and 4 git commands to generate.