diff options
| author | Josh Gao <jmgao@google.com> | 2016-08-29 14:20:59 -0700 |
|---|---|---|
| committer | Josh Gao <jmgao@google.com> | 2016-08-29 14:37:49 -0700 |
| commit | 6496c4bf6f31bd0714a341d51c1cff7f15938e84 (patch) | |
| tree | 721bcd144350e93de01556be07ae313c3e5574ba /trusty/coverage/coverage.cpp | |
| parent | e461b37965ff609ea36c1fbb6e4e8df1fb7b7d7f (diff) | |
base: disallow close() on unique_fd.
unique_fd's implicit conversion to int allows it to be passed to
close(2), which is dangerous because unique_fd will think that it still
has ownership of the now-closed fd. Disallow this by providing an
overload for close that's tagged with an attribute that gives a
compile-time error.
Test: m
Change-Id: I514591335b337f2f57c1df371cf3979304aea17c
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions
