Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2934de9 authored by Bart Van Assche's avatar Bart Van Assche Committed by Gerrit Code Review
Browse files

Merge "init: Introduce RequiresConsole()"

parents 27630f0d 98739165
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ Result<void> SetProcessAttributes(const ProcessAttributes& attr) {
        }
    }

    if (!attr.console.empty()) {
    if (RequiresConsole(attr)) {
        setsid();
        OpenConsole(attr.console);
    } else {
+5 −0
Original line number Diff line number Diff line
@@ -95,6 +95,11 @@ struct ProcessAttributes {
    int priority;
    bool stdio_to_kmsg;
};

inline bool RequiresConsole(const ProcessAttributes& attr) {
    return !attr.console.empty();
}

Result<void> SetProcessAttributes(const ProcessAttributes& attr);

Result<void> WritePidToFiles(std::vector<std::string>* files);