Launch the rotation thread using lttng_thread
[lttng-tools.git] / src / bin / lttng-sessiond / process-utils.c
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * 2013 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, version 2 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include <signal.h>
21 #include "lttng-sessiond.h"
22
23 /* Notify parents that we are ready for cmd and health check */
24 void sessiond_signal_parents(void)
25 {
26 /*
27 * Notify parent pid that we are ready to accept command
28 * for client side. This ppid is the one from the
29 * external process that spawned us.
30 */
31 if (config.sig_parent) {
32 kill(ppid, SIGUSR1);
33 }
34
35 /*
36 * Notify the parent of the fork() process that we are
37 * ready.
38 */
39 if (config.daemonize || config.background) {
40 kill(child_ppid, SIGUSR1);
41 }
42 }
This page took 0.029218 seconds and 4 git commands to generate.