desktop entry proposal: TerminateSafe=true key
mzkqt at 0pointer.de
Fri May 7 07:04:50 PDT 2010
On Fri, 07.05.10 09:54, Colin Walters (walters at verbum.org) wrote:
> I have a very small proposal for an addition to the desktop entry
> specification. As you know if you've been following the developments
> in mobile operating systems, there have been a number of design
> advancements over the traditional "desktop" computing that we should
> take inspiration from.
> One of these is that the system has the freedom to terminate user
> applications and processes when under memory pressure, because it's
> part of the system design contract.
> I propose the addition of a new key for .desktop files, of the form:
> What this simply means is that if the operating system is under memory
> pressure, it can at its discretion terminate the Unix processes
> associated with this application without notice (i.e. SIGKILL).
Well, the OOM killer kills processes at its descretion, and it doesn't
look into the desktop file of the process before doing that... ;-)
It's also not a binary thing. It's a nice-level-like thing: some process
might be less necessary than some other but still more important than a
And, as it turns out the kernel already has a per-process setting that
allows you to adjust your likeliness of being killed first by the OOM
killer. You can change it via writing to /proc/self/oom_adj.
Which makes me wondering: how does your suggestion relate to the kernel
setting, and why should a developer fiddle with your setting instead of
the kernel setting?
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the xdg