clang-tidy: add a subset of cppcoreguidelines and other style checks
[lttng-tools.git] / src / bin / lttng-sessiond / process-utils.cpp
CommitLineData
a7333da7 1/*
21cf9b6b 2 * Copyright (C) 2011 EfficiOS Inc.
ab5be9fa
MJ
3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
a7333da7 5 *
ab5be9fa 6 * SPDX-License-Identifier: GPL-2.0-only
a7333da7 7 *
a7333da7
JG
8 */
9
c9e313bc 10#include "lttng-sessiond.hpp"
a7333da7 11
28ab034a
JG
12#include <signal.h>
13
a7333da7 14/* Notify parents that we are ready for cmd and health check */
cd9adb8b 15void sessiond_signal_parents()
a7333da7
JG
16{
17 /*
18 * Notify parent pid that we are ready to accept command
19 * for client side. This ppid is the one from the
20 * external process that spawned us.
21 */
412d7227
SM
22 if (the_config.sig_parent) {
23 kill(the_ppid, SIGUSR1);
a7333da7
JG
24 }
25
26 /*
27 * Notify the parent of the fork() process that we are
28 * ready.
29 */
412d7227
SM
30 if (the_config.daemonize || the_config.background) {
31 kill(the_child_ppid, SIGUSR1);
a7333da7
JG
32 }
33}
This page took 0.052489 seconds and 4 git commands to generate.