mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Allow sandboxes to specify custom notifiers.
PiperOrigin-RevId: 334154462 Change-Id: Ia62242913731ab017a9bf8733a77a647582af243
This commit is contained in:
parent
cd75f94094
commit
376ca05c56
@ -201,7 +201,7 @@ absl::Status Sandbox::Init() {
|
|||||||
ModifyExecutor(executor.get());
|
ModifyExecutor(executor.get());
|
||||||
|
|
||||||
s2_ = absl::make_unique<sandbox2::Sandbox2>(std::move(executor),
|
s2_ = absl::make_unique<sandbox2::Sandbox2>(std::move(executor),
|
||||||
std::move(s2p));
|
std::move(s2p), CreateNotifier());
|
||||||
auto res = s2_->RunAsync();
|
auto res = s2_->RunAsync();
|
||||||
|
|
||||||
comms_ = s2_->comms();
|
comms_ = s2_->comms();
|
||||||
|
@ -141,6 +141,9 @@ class Sandbox {
|
|||||||
// Modifies the Executor object if needed.
|
// Modifies the Executor object if needed.
|
||||||
virtual void ModifyExecutor(sandbox2::Executor* executor) {}
|
virtual void ModifyExecutor(sandbox2::Executor* executor) {}
|
||||||
|
|
||||||
|
// Provides a custom notifier for sandboxee events. May return nullptr.
|
||||||
|
virtual std::unique_ptr<sandbox2::Notify> CreateNotifier() { return nullptr; }
|
||||||
|
|
||||||
// Exits the sandboxee.
|
// Exits the sandboxee.
|
||||||
void Exit() const;
|
void Exit() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user