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

Commit 7c9b1a3e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Duplicate the file descriptors for shellCommand" into main

parents a069f032 d6df2edb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -180,9 +180,9 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep
            return reply->writeUtf8AsUtf16(driverPath);
        }
        case SHELL_COMMAND_TRANSACTION: {
            int in = data.readFileDescriptor();
            int out = data.readFileDescriptor();
            int err = data.readFileDescriptor();
            int in = dup(data.readFileDescriptor());
            int out = dup(data.readFileDescriptor());
            int err = dup(data.readFileDescriptor());

            std::vector<String16> args;
            data.readString16Vector(&args);
@@ -195,6 +195,9 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep

            status = shellCommand(in, out, err, args);
            if (resultReceiver != nullptr) resultReceiver->send(status);
            ::close(in);
            ::close(out);
            ::close(err);

            return OK;
        }