From: Kimmo Hämäläinen Date: Mon, 13 Aug 2007 11:13:35 +0300 Subject: Make activated processes not inherit oom_adj Bug: https://bugs.freedesktop.org//show_bug.cgi?id=32851 Bug-NB: NB#65462 Index: dbus-1.3.0/dbus/dbus-spawn.c =================================================================== --- dbus-1.3.0.orig/dbus/dbus-spawn.c +++ dbus-1.3.0/dbus/dbus-spawn.c @@ -919,6 +919,13 @@ do_exec (int child #ifdef DBUS_BUILD_TESTS int i, max_open; #endif + /* Change oom protection to off to prevent inheritance from dbus server */ + int oom = open ("/proc/self/oom_adj", O_WRONLY|O_SYNC); + if (oom >= 0) + { + write (oom, "0", sizeof (char)); + _dbus_close (oom, NULL); + } _dbus_verbose_reset (); _dbus_verbose ("Child process has PID " DBUS_PID_FORMAT "\n",