Loading adb/shell_service.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -493,10 +493,10 @@ void Subprocess::PassDataStreams() { // We also need to close the pipes connected to the child process // so that if it ignores SIGHUP and continues to write data it // won't fill up the pipe and block. stdinout_sfd_.clear(); stderr_sfd_.clear(); stdinout_sfd_.reset(); stderr_sfd_.reset(); } dead_sfd->clear(); dead_sfd->reset(); } } } Loading base/include/android-base/unique_fd.h +2 −6 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class unique_fd_impl final { unique_fd_impl() : value_(-1) {} explicit unique_fd_impl(int value) : value_(value) {} ~unique_fd_impl() { clear(); } ~unique_fd_impl() { reset(); } unique_fd_impl(unique_fd_impl&& other) : value_(other.release()) {} unique_fd_impl& operator=(unique_fd_impl&& s) { Loading @@ -63,17 +63,13 @@ class unique_fd_impl final { return *this; } void reset(int new_value) { void reset(int new_value = -1) { if (value_ != -1) { Closer::Close(value_); } value_ = new_value; } void clear() { reset(-1); } int get() const { return value_; } operator int() const { return get(); } Loading Loading
adb/shell_service.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -493,10 +493,10 @@ void Subprocess::PassDataStreams() { // We also need to close the pipes connected to the child process // so that if it ignores SIGHUP and continues to write data it // won't fill up the pipe and block. stdinout_sfd_.clear(); stderr_sfd_.clear(); stdinout_sfd_.reset(); stderr_sfd_.reset(); } dead_sfd->clear(); dead_sfd->reset(); } } } Loading
base/include/android-base/unique_fd.h +2 −6 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class unique_fd_impl final { unique_fd_impl() : value_(-1) {} explicit unique_fd_impl(int value) : value_(value) {} ~unique_fd_impl() { clear(); } ~unique_fd_impl() { reset(); } unique_fd_impl(unique_fd_impl&& other) : value_(other.release()) {} unique_fd_impl& operator=(unique_fd_impl&& s) { Loading @@ -63,17 +63,13 @@ class unique_fd_impl final { return *this; } void reset(int new_value) { void reset(int new_value = -1) { if (value_ != -1) { Closer::Close(value_); } value_ = new_value; } void clear() { reset(-1); } int get() const { return value_; } operator int() const { return get(); } Loading