Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.clone/dtrace_child.c

raw
1 /* Systemtap test case
2 * Copyright (C) 2010, Red Hat Inc.
3 *
4 * This file is part of systemtap, and is free software. You can
5 * redistribute it and/or modify it under the terms of the GNU General
6 * Public License (GPL); either version 2, or (at your option) any
7 * later version.
8 */
9
10 #include <stdio.h>
11 #include <sys/types.h>
12 #include <unistd.h>
13 #include "dtrace_child_probes.h"
14
15 #if !defined(USE_SEMAPHORES)
16 #undef CHILD_MAIN_ENABLED
17 #define CHILD_MAIN_ENABLED() (1)
18 #endif
19
20 int
21 main(int argc, char **argv)
22 {
23 if (CHILD_MAIN_ENABLED()) {
24 CHILD_MAIN(getpid());
25 }
26 return 0;
27 }