mirror of
https://github.com/openai/codex.git
synced 2026-09-15 12:08:01 +00:00
Ensure Linux sleep inhibitor releases on drop
This commit is contained in:
@@ -85,6 +85,12 @@ impl PlatformSleepInhibitor for LinuxSleepInhibitor {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for LinuxSleepInhibitor {
|
||||
fn drop(&mut self) {
|
||||
self.release();
|
||||
}
|
||||
}
|
||||
|
||||
fn spawn_backend(backend: LinuxBackend) -> Result<Child, std::io::Error> {
|
||||
match backend {
|
||||
LinuxBackend::SystemdInhibit => Command::new("systemd-inhibit")
|
||||
|
||||
Reference in New Issue
Block a user