Merge "libsnapshot: Pass MSG_NOSIGNAL socket flags" am: d79e4f4c19 am: e22825a7d2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1687665 Change-Id: I621af5594d4c8b0b975b1662fb08cf23e4e774fa
This commit is contained in:
commit
b7947de541
2 changed files with 2 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ bool SnapuserdClient::ValidateConnection() {
|
|||
|
||||
bool SnapuserdClient::Sendmsg(const std::string& msg) {
|
||||
LOG(DEBUG) << "Sendmsg: msg " << msg << " sockfd: " << sockfd_;
|
||||
ssize_t numBytesSent = TEMP_FAILURE_RETRY(send(sockfd_, msg.data(), msg.size(), 0));
|
||||
ssize_t numBytesSent = TEMP_FAILURE_RETRY(send(sockfd_, msg.data(), msg.size(), MSG_NOSIGNAL));
|
||||
if (numBytesSent < 0) {
|
||||
PLOG(ERROR) << "Send failed";
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ DmUserHandler::DmUserHandler(std::shared_ptr<Snapuserd> snapuserd)
|
|||
: snapuserd_(snapuserd), misc_name_(snapuserd_->GetMiscName()) {}
|
||||
|
||||
bool SnapuserdServer::Sendmsg(android::base::borrowed_fd fd, const std::string& msg) {
|
||||
ssize_t ret = TEMP_FAILURE_RETRY(send(fd.get(), msg.data(), msg.size(), 0));
|
||||
ssize_t ret = TEMP_FAILURE_RETRY(send(fd.get(), msg.data(), msg.size(), MSG_NOSIGNAL));
|
||||
if (ret < 0) {
|
||||
PLOG(ERROR) << "Snapuserd:server: send() failed";
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue