[maemo-commits] [maemo-commits] r8215 - in projects/haf/branches/dbus/0.x/trunk/debian: . patches

From: kihamala at stage.maemo.org kihamala at stage.maemo.org
Date: Tue Nov 21 15:12:54 EET 2006
Author: kihamala
Date: 2006-11-21 15:12:53 +0200 (Tue, 21 Nov 2006)
New Revision: 8215

Added:
   projects/haf/branches/dbus/0.x/trunk/debian/patches/35-do-not-inherit-oom-adj.patch
Modified:
   projects/haf/branches/dbus/0.x/trunk/debian/changelog
Log:
added patch to remove inheritance of the oom_adj value


Modified: projects/haf/branches/dbus/0.x/trunk/debian/changelog
===================================================================
--- projects/haf/branches/dbus/0.x/trunk/debian/changelog	2006-11-21 13:12:41 UTC (rev 8214)
+++ projects/haf/branches/dbus/0.x/trunk/debian/changelog	2006-11-21 13:12:53 UTC (rev 8215)
@@ -2,8 +2,9 @@
 
   * UNRELEASED
   * Activated process now creates its own process group. Fixes: NB#46383
+  * Added patch to remove inheriting the oom_adj value. Fixes: NB#47812
 
- -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Tue, 07 Nov 2006 16:53:39 +0200
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Tue, 21 Nov 2006 15:12:21 +0200
 
 dbus (0.61-osso23) experimental; urgency=low
 

Added: projects/haf/branches/dbus/0.x/trunk/debian/patches/35-do-not-inherit-oom-adj.patch
===================================================================
--- projects/haf/branches/dbus/0.x/trunk/debian/patches/35-do-not-inherit-oom-adj.patch	2006-11-21 13:12:41 UTC (rev 8214)
+++ projects/haf/branches/dbus/0.x/trunk/debian/patches/35-do-not-inherit-oom-adj.patch	2006-11-21 13:12:53 UTC (rev 8215)
@@ -0,0 +1,17 @@
+diff -pur trunk/dbus/dbus-spawn.c trunk.new/dbus/dbus-spawn.c
+--- trunk/dbus/dbus-spawn.c	2006-11-16 11:30:08.000000000 +0200
++++ trunk.new/dbus/dbus-spawn.c	2006-11-21 15:09:03.488456424 +0200
+@@ -847,6 +847,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 %lu\n",


More information about the maemo-commits mailing list