mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Fix unused warning for IsFdOpen()
PiperOrigin-RevId: 282346983 Change-Id: I7010caf0e6f3ddb420ef992f6aa2554d540667a3
This commit is contained in:
parent
4f892864c8
commit
5c38f62ba7
|
@ -79,16 +79,6 @@ int RunTestcase(const std::string& path, const std::vector<std::string>& args) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsFdOpen(int fd) {
|
|
||||||
int ret = fcntl(fd, F_GETFD);
|
|
||||||
if (ret == -1) {
|
|
||||||
VLOG(1) << "FD: " << fd << " is closed";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
VLOG(1) << "FD: " << fd << " is open";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test that marking file descriptors as close-on-exec works.
|
// Test that marking file descriptors as close-on-exec works.
|
||||||
TEST(SanitizerTest, TestMarkFDsAsCOE) {
|
TEST(SanitizerTest, TestMarkFDsAsCOE) {
|
||||||
// Open a few file descriptors in non-close-on-exec mode.
|
// Open a few file descriptors in non-close-on-exec mode.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user