2 * Copyright (C) 2009 Pierre-Marc Fournier
3 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 * SPDX-License-Identifier: LGPL-2.1-only
11 #include <sys/types.h>
14 #define TRACEPOINT_DEFINE
15 #define TRACEPOINT_CREATE_PROBES
16 #include "ust_tests_daemon.h"
18 int main(int argc
, char **argv
, char *env
[])
23 fprintf(stderr
, "usage: daemon\n");
27 pid_t parent_pid
= getpid();
28 printf("parent_pid %d\n", parent_pid
);
29 tracepoint(ust_tests_daemon
, before_daemon
, parent_pid
);
31 result
= daemon(0, 1);
33 printf("child_pid %d\n", getpid());
35 tracepoint(ust_tests_daemon
, after_daemon_child
, getpid());
37 tracepoint(ust_tests_daemon
, after_daemon_parent
);
This page took 0.041644 seconds and 5 git commands to generate.