diff --git a/Servers/SystemServer/main.cpp b/Servers/SystemServer/main.cpp index 6d83e73c5b5..57cda029205 100644 --- a/Servers/SystemServer/main.cpp +++ b/Servers/SystemServer/main.cpp @@ -1,11 +1,11 @@ #include +#include #include #include #include #include #include #include -#include void start_process(const char* prog, int prio) { @@ -26,25 +26,21 @@ void start_process(const char* prog, int prio) } while (true) { - if (pid == 0) { - dbgprintf("Executing for %s... at prio %d\n", prog, prio); - struct sched_param p; - p.sched_priority = prio; - int ret = sched_setparam(pid, &p); - ASSERT(ret == 0); + dbgprintf("Executing for %s... at prio %d\n", prog, prio); + struct sched_param p; + p.sched_priority = prio; + int ret = sched_setparam(pid, &p); + ASSERT(ret == 0); - char* progv[256]; - progv[0] = const_cast(prog); - progv[1] = nullptr; - ret = execv(prog, progv); - if (ret < 0) { - dbgprintf("Exec %s failed! %s", prog, strerror(errno)); - continue; - } - break; - } else { - break; + char* progv[256]; + progv[0] = const_cast(prog); + progv[1] = nullptr; + ret = execv(prog, progv); + if (ret < 0) { + dbgprintf("Exec %s failed! %s", prog, strerror(errno)); + continue; } + break; } }