free(opt_output_path);
/* Close thread quit pipes */
- utils_close_pipe(thread_quit_pipe);
+ (void) fd_tracker_util_pipe_close(the_fd_tracker, thread_quit_pipe);
uri_free(control_uri);
uri_free(data_uri);
*/
static int init_thread_quit_pipe(void)
{
- int ret;
-
- ret = utils_create_pipe_cloexec(thread_quit_pipe);
-
- return ret;
+ return fd_tracker_util_pipe_open_cloexec(the_fd_tracker,
+ "Quit pipe", thread_quit_pipe);
}
/*
/* Daemonize */
if (opt_daemon || opt_background) {
- int i;
-
ret = lttng_daemonize(&child_ppid, &recv_child_signal,
!opt_background);
if (ret < 0) {
retval = -1;
goto exit_options;
}
-
- /*
- * We are in the child. Make sure all other file
- * descriptors are closed, in case we are called with
- * more opened file descriptors than the standard ones.
- */
- for (i = 3; i < sysconf(_SC_OPEN_MAX); i++) {
- (void) close(i);
- }
}
if (opt_working_directory) {