From 0517fec5b924db8a899757941b4ef676259fd1fd Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sun, 11 Feb 2018 13:05:44 +0000 Subject: [PATCH] Allow initial services to be specified on command-line on non-Linux OS. --- src/dinit.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dinit.cc b/src/dinit.cc index 67474eb..247937f 100644 --- a/src/dinit.cc +++ b/src/dinit.cc @@ -227,6 +227,8 @@ int dinit_main(int argc, char **argv) if (! am_system_init || strcmp(argv[i], "auto") != 0) { services_to_start.push_back(argv[i]); } +#else + services_to_start.push_back(argv[i]); #endif } } @@ -330,8 +332,8 @@ int dinit_main(int argc, char **argv) #if defined(__FreeBSD__) || defined(__DragonFly__) // Documentation (man page) for this kind of sucks. PROC_REAP_ACQUIRE "acquires the reaper status for // the current process" but does that mean the first two arguments still need valid values to be - // supplied? We'll play itself and explicitly target our own process: - procctl(P_PID, getpid(), PROC_REAP_ACQUIRE); + // supplied? We'll play it safe and explicitly target our own process: + procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL); #endif log_flush_timer.add_timer(event_loop, dasynq::clock_type::MONOTONIC); -- 2.25.1