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

Commit a307bdac authored by Todd Frederick's avatar Todd Frederick Committed by Automerger Merge Worker
Browse files

Merge "dumpstate: Close API FDs on exec" am: b8ba6e9c am: bab1e600 am:...

Merge "dumpstate: Close API FDs on exec" am: b8ba6e9c am: bab1e600 am: ecc2f9e4 am: 620d660d

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2043435



Change-Id: I19667dc826de76bf43d444d520de60ee184a4e99
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2d1b4781 620d660d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2733,8 +2733,8 @@ void Dumpstate::DumpOptions::Initialize(BugreportMode bugreport_mode,
                                        const android::base::unique_fd& screenshot_fd_in,
                                        const android::base::unique_fd& screenshot_fd_in,
                                        bool is_screenshot_requested) {
                                        bool is_screenshot_requested) {
    // Duplicate the fds because the passed in fds don't outlive the binder transaction.
    // Duplicate the fds because the passed in fds don't outlive the binder transaction.
    bugreport_fd.reset(dup(bugreport_fd_in.get()));
    bugreport_fd.reset(fcntl(bugreport_fd_in.get(), F_DUPFD_CLOEXEC, 0));
    screenshot_fd.reset(dup(screenshot_fd_in.get()));
    screenshot_fd.reset(fcntl(screenshot_fd_in.get(), F_DUPFD_CLOEXEC, 0));


    SetOptionsFromMode(bugreport_mode, this, is_screenshot_requested);
    SetOptionsFromMode(bugreport_mode, this, is_screenshot_requested);
}
}