Add a comment to explain how errno is set
Since it is nontrivial which modifies `errno` is modified in ExecuteForTask(), add a comment that explains this. Bug: 213617178 Test: Compile-tested only. Change-Id: I49ce9c8054fdc59e61b2e5f9ffe6f16743a94401 Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
parent
48d403a511
commit
54136f8bf4
|
@ -215,6 +215,9 @@ bool SetAttributeAction::ExecuteForTask(int tid) const {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// The PLOG() statement below uses the error code stored in `errno` by
|
||||
// WriteStringToFile() because access() only overwrites `errno` if it fails
|
||||
// and because this code is only reached if the access() function returns 0.
|
||||
PLOG(ERROR) << "Failed to write '" << value_ << "' to " << path;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue