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

Commit f4ed76f8 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "init/service.cpp: fix FD leak for services with consoles" am:...

Merge "init/service.cpp: fix FD leak for services with consoles" am: 4173d9b5 am: 869ce5d4 am: 9bebb6f3
am: 90007c54

Change-Id: If188ed43c8a040472231fd552682118a59d3b88e
parents 28fb5ed3 90007c54
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -567,9 +567,9 @@ bool Service::Start() {
            console_ = default_console;
        }

        bool have_console = (open(console_.c_str(), O_RDWR | O_CLOEXEC) != -1);
        bool have_console = (access(console_.c_str(), R_OK | W_OK) != -1);
        if (!have_console) {
            PLOG(ERROR) << "service '" << name_ << "' couldn't open console '" << console_ << "'";
            PLOG(ERROR) << "service '" << name_ << "' cannot gain read/write access to console '" << console_ << "'";
            flags_ |= SVC_DISABLED;
            return false;
        }