const char * working_dir_c = nullptr;
if (! working_dir.empty()) working_dir_c = working_dir.c_str();
after_fork(getpid());
- run_child_proc(cmd.data(), working_dir_c, logfile, on_console, pipefd[1], control_socket[1],
- socket_fd, notify_pipe[1], force_notification_fd, nullptr, run_as_uid, run_as_gid, rlimits);
+ run_proc_params run_params{cmd.data(), working_dir_c, logfile, pipefd[1], run_as_uid, run_as_gid, rlimits};
+ run_params.on_console = on_console;
+ run_params.in_foreground = !onstart_flags.shares_console;
+ run_params.csfd = control_socket[1];
+ run_params.socket_fd = socket_fd;
+ run_params.notify_fd = notify_pipe[1];
+ run_params.force_notify_fd = force_notification_fd;
+ run_params.notify_var = notification_var.c_str();
+ run_params.env_file = env_file.c_str();
+ run_child_proc(run_params);
}
else {
// Parent process
void base_process_service::emergency_stop() noexcept
{
- if (! do_auto_restart() && start_explicit) {
- start_explicit = false;
- release(false);
- }
forced_stop();
stop_dependents();
}