[option:--live-port='URL'] [option:--output='DIR'] [option:--group='GROUP']
[option:--verbose]... [option:--working-directory='DIR']
[option:--group-output-by-host | option:--group-output-by-session] [option:--disallow-clear]
- [option:--dynamic-port-allocation] [option:--pid-file='FILE']
+ [option:--dynamic-port-allocation] [option:--pid-file='FILE'] [option:--sig-parent]
DESCRIPTION
+
This file is not otherwise used by lttng-relayd and is removed at shutdown.
+option:-S, option:--sig-parent::
+ Send the `USR1` signal to the parent process to notify readiness.
++
+You can also use the option:--daemonize or option:--background option,
+in which case `lttng-relayd` ensures the daemon is ready to receive
+client commands before it exits.
+
Output
~~~~~~
See the ``<<output-directory,Output directory>>'' section above to learn
/* command line options */
char *opt_output_path, *opt_working_directory, *opt_pid_file = nullptr;
static int opt_daemon, opt_background, opt_print_version,
- opt_allow_clear = 1, opt_dynamic_port_allocation = 0;
+ opt_allow_clear = 1, opt_dynamic_port_allocation = 0, opt_sig_parent = 0;
enum relay_group_output_by opt_group_output_by = RELAYD_GROUP_OUTPUT_BY_UNKNOWN;
/* Argument variables */
},
{ "disallow-clear", 0, nullptr, 'x' },
{ "dynamic-port-allocation", 0, nullptr, '\0' },
+ {
+ "sig-parent",
+ 0,
+ nullptr,
+ 'S'
+ },
{
nullptr,
0,
/* Disallow clear */
opt_allow_clear = 0;
break;
+ case 'S':
+ opt_sig_parent = getppid();
+ break;
default:
/* Unknown option or other error.
* Error is printed by getopt, just return */
* signal that asks threads to teardown).
*/
+ /* Initialization complete, signal parent PID if necessary. */
+ if (opt_sig_parent != 0) {
+ kill(opt_sig_parent, SIGUSR1);
+ }
+
ret = relayd_live_join();
if (ret) {
retval = -1;