-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
I’m currently implementing logic to persist and handle application state when the operating system is shutting down. I checked the Tauri documentation and expected that the RunEvent::Exit or RunEvent::ExitRequested events would trigger during an OS-initiated shutdown. However, these events do not seem to fire when Windows shuts down the application as part of the system shutdown process.
At the moment I’m unsure what the recommended way is to handle this use case in Tauri and whether there is a specific API or pattern for detecting OS-level shutdown events. Since gracefully handling state on system shutdown is a common requirement for many desktop applications, I believe this would be useful to clarify or document.
My current development is on Windows, though I’m not sure whether OS-specific behavior should be considered for the docs.
Could the documentation be extended to explain:
- How Tauri applications should detect and respond to operating system shutdowns?
- Whether Exit or ExitRequested is expected to fire on OS shutdown, or if another mechanism should be used?
- Any OS-specific considerations (e.g., Windows, macOS, Linux)?
- Examples or recommended patterns for graceful shutdown in this scenario?
Thank you!