2 ms·
You could use the message bus to post a message to the service that handles out of memory decisions, which in turn could either 1. Show a GUI with a choice 2.
by Asooka 7y ago
You could use the message bus to post a message to the service that handles out of memory decisions, which in turn could either
1. Show a GUI with a choice
2. Show a message on the current terminal and ask what to do
3. Just return "kill it now" if there is no interactive session
And if there is no such service, just default to 3. The problem really is that the state cannot be captured and communicated to the user. I doubt the NT kernel itself shows a GUI window, it's probably a service that gets woken up by a kernel exception, which in turn shows the window. Basically, the Linux kernel needs more pluggable functionality for user interactions. It's absolutely fine and even recommended to not have an entire GUI in the kernel, it needs to just provide a mechanism for userspace to capture the event and decide what to do with it.