5 #include <ust/marker.h>
7 int main(int argc
, char **argv
, char *env
[])
12 fprintf(stderr
, "usage: fork PROG_TO_EXEC\n");
16 printf("Fork test program, parent pid is %d\n", getpid());
17 trace_mark(ust
, before_fork
, MARK_NOARGS
);
25 char *args
[] = {"fork2", NULL
};
27 printf("Child pid is %d\n", getpid());
29 trace_mark(ust
, after_fork_child
, MARK_NOARGS
);
31 trace_mark(ust
, before_exec
, "pid %d", getpid());
33 result
= execve(argv
[1], args
, env
);
39 trace_mark(ust
, after_exec
, "pid %d", getpid());
42 trace_mark(ust
, after_fork_parent
, MARK_NOARGS
);
This page took 0.043129 seconds and 4 git commands to generate.