|
|
|
|
|
by JohnFen
2400 days ago
|
|
> modern OSes want to be able to close programs behind your back, while they seem to still be running, and then restore them to their previous state when you come back to them. I thought they were suspending them, not closing them. Those are very, very different things. In any case, pretending that applications aren't closed when they are is no better. |
|
On the other hand, if by “suspending” you mean “the OS asks the program to persist its running state to disk, which it can easily do because it’s using GUI-control and scene-graph frameworks that know how to serialize out their current state”—and then, when it has done this, the OS considers the process “clean” (like a clean page of disk cache) and therefore discardable—then yes, the OS is suspending processes.
Keep in mind that you need to add a flag to your application’s OS-readable metadata (the application manifest in Windows; the Info.plist in macOS/iOS) opting into this behaviour, signalling that your process is okay with being shut down at any time when it’s in the OS-visible “clean” state, and isn’t, say, a host for an RPC server that other applications are expecting to have a stable connection to.