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

Commit 97b9935f authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "adbd: fix spurious close of uninitialized fd."

am: 3c608c74

* commit '3c608c74':
  adbd: fix spurious close of uninitialized fd.
parents d0b09603 3c608c74
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -315,7 +315,9 @@ bool Subprocess::ForkAndExec(std::string* error) {
    if (type_ == SubprocessType::kPty) {
        int fd;
        pid_ = forkpty(&fd, pts_name, nullptr, nullptr);
        if (pid_ > 0) {
          stdinout_sfd_.Reset(fd);
        }
    } else {
        if (!CreateSocketpair(&stdinout_sfd_, &child_stdinout_sfd)) {
            *error = android::base::StringPrintf("failed to create socketpair for stdin/out: %s",