[maemo-commits] [maemo-commits] r16518 - in projects/haf/trunk/dbus/debian: . patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Oct 28 18:31:17 EET 2008
- Previous message: [maemo-commits] r16517 - projects/haf/doc/mvo
- Next message: [maemo-commits] r16519 - projects/haf/trunk/dbus/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: guillem Date: 2008-10-28 18:31:15 +0200 (Tue, 28 Oct 2008) New Revision: 16518 Modified: projects/haf/trunk/dbus/debian/changelog projects/haf/trunk/dbus/debian/patches/08-create-new-process-group.patch Log: Reset the scheduling policy to SCHED_OTHER for spawned services Modified: projects/haf/trunk/dbus/debian/changelog =================================================================== --- projects/haf/trunk/dbus/debian/changelog 2008-10-28 15:30:55 UTC (rev 16517) +++ projects/haf/trunk/dbus/debian/changelog 2008-10-28 16:31:15 UTC (rev 16518) @@ -1,3 +1,16 @@ +dbus (1.2.4-0maemo2) UNRELEASED; urgency=low + + * Reset the scheduling policy to SCHED_OTHER for spawned services. + - debian/patches/08-create-new-process-group.patch: Updated. + + -- Guillem Jover <guillem.jover at nokia.com> Tue, 28 Oct 2008 18:19:17 +0200 + +dbus (1.2.4-0maemo1) unstable; urgency=low + + * New upstream release. + + -- Guillem Jover <guillem.jover at nokia.com> Wed, 08 Oct 2008 19:32:58 +0300 + dbus (1.2.3-0maemo1) unstable; urgency=low * New upstream release. Modified: projects/haf/trunk/dbus/debian/patches/08-create-new-process-group.patch =================================================================== --- projects/haf/trunk/dbus/debian/patches/08-create-new-process-group.patch 2008-10-28 15:30:55 UTC (rev 16517) +++ projects/haf/trunk/dbus/debian/patches/08-create-new-process-group.patch 2008-10-28 16:31:15 UTC (rev 16518) @@ -1,21 +1,52 @@ -Index: b/dbus/dbus-spawn.c +Index: dbus-1.2.4/dbus/dbus-spawn.c =================================================================== ---- a/dbus/dbus-spawn.c 2008-04-04 18:24:08.000000000 +0300 -+++ b/dbus/dbus-spawn.c 2008-06-09 20:12:29.000000000 +0300 -@@ -1188,6 +1188,16 @@ _dbus_spawn_async_with_babysitter (DBusB +--- dbus-1.2.4.orig/dbus/dbus-spawn.c ++++ dbus-1.2.4/dbus/dbus-spawn.c +@@ -35,6 +35,9 @@ + #ifdef HAVE_ERRNO_H + #include <errno.h> + #endif ++#ifdef _POSIX_PRIORITY_SCHEDULING ++#include <sched.h> ++#endif + + /** + * @addtogroup DBusInternalsUtils +@@ -1061,6 +1064,23 @@ babysit (pid_t grandchild_pid, + exit (1); + } + ++void ++setup_child_priority(void) ++{ ++ int p; ++#ifdef _POSIX_PRIORITY_SCHEDULING ++ struct sched_param sched_param; ++ ++ sched_param.sched_priority = 0; ++ sched_setscheduler(0, SCHED_OTHER, &sched_param); ++#endif ++ ++ errno = 0; ++ p = getpriority(PRIO_PROCESS, 0); ++ if (!errno && p < 0) ++ setpriority(PRIO_PROCESS, 0, 0); ++} ++ + /** + * Spawns a new process. The executable name and argv[0] + * are the same, both are provided in argv[0]. The child_setup +@@ -1198,6 +1218,13 @@ _dbus_spawn_async_with_babysitter (DBusB } else if (grandchild_pid == 0) { -+ int p; -+ + /* put the child into a new session and process group, so that + * killpg() can be used safely */ + if (setsid () == -1) + _dbus_warn ("setsid() failed: %s\n", _dbus_strerror (errno)); -+ errno = 0; -+ p = getpriority(PRIO_PROCESS, 0); -+ if (!errno && p < 0) -+ setpriority(PRIO_PROCESS, 0, 0); ++ ++ setup_child_priority(); ++ do_exec (child_err_report_pipe[WRITE_END], argv, - child_setup, user_data); + env,
- Previous message: [maemo-commits] r16517 - projects/haf/doc/mvo
- Next message: [maemo-commits] r16519 - projects/haf/trunk/dbus/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]