Skip to content

Commit

Permalink
The private Sandbox::Exit function is unused and can be removed.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 714868557
Change-Id: I792564dad2876f86796f5a1546eaef1c5d430982
  • Loading branch information
okunz authored and copybara-github committed Jan 13, 2025
1 parent 899792a commit bfcd2dd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
11 changes: 0 additions & 11 deletions sandboxed_api/sandbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +514,6 @@ absl::Status Sandbox::SetWallTimeLimit(absl::Duration limit) const {
return absl::OkStatus();
}

void Sandbox::Exit() const {
if (!is_active()) {
return;
}
s2_->set_walltime_limit(absl::Seconds(1));
if (!rpc_channel_->Exit().ok()) {
LOG(WARNING) << "rpc_channel->Exit() failed, killing PID: " << pid();
s2_->Kill();
}
}

std::unique_ptr<sandbox2::Policy> Sandbox::ModifyPolicy(
sandbox2::PolicyBuilder* builder) {
return builder->BuildOrDie();
Expand Down
3 changes: 0 additions & 3 deletions sandboxed_api/sandbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ class Sandbox {
// Provides a custom notifier for sandboxee events. May return nullptr.
virtual std::unique_ptr<sandbox2::Notify> CreateNotifier() { return nullptr; }

// Exits the sandboxee.
void Exit() const;

// The main sandbox2::Sandbox2 object.
std::unique_ptr<sandbox2::Sandbox2> s2_;
// Marks whether Sandbox2 result was already fetched.
Expand Down

0 comments on commit bfcd2dd

Please sign in to comment.