Fix missing #include (needed for compiling with GCC 10)
[oweals/dinit.git] / src / baseproc-service.cc
index ba2227c017f27a3607b596f57ef571e304e3df3f..32c49d5969600901f3ae2f59815ea62f1717cc49 100644 (file)
@@ -155,8 +155,16 @@ bool base_process_service::start_ps_process(const std::vector<const char *> &cmd
         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
@@ -367,10 +375,6 @@ void base_process_service::timer_expired() noexcept
 
 void base_process_service::emergency_stop() noexcept
 {
-    if (! do_auto_restart() && start_explicit) {
-        start_explicit = false;
-        release(false);
-    }
     forced_stop();
     stop_dependents();
 }