[telepathy-stream-engine/refs/tags/telepathy-stream-engine_0.5.10] Always enable rt mode if possible
Olivier Crête
olivier.crete at collabora.co.uk
Mon Oct 26 09:28:20 PDT 2009
---
src/stream-engine-main.c | 31 +++++++++++++------------------
1 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/src/stream-engine-main.c b/src/stream-engine-main.c
index ee5493f..73afb5b 100644
--- a/src/stream-engine-main.c
+++ b/src/stream-engine-main.c
@@ -220,24 +220,19 @@ int main(int argc, char **argv)
GError *error = NULL;
#ifdef USE_REALTIME
- if (getenv("STREAM_ENGINE_REALTIME"))
- {
- uid_t uid;
- struct rlimit rl;
-
- rl.rlim_max = 9;
- rl.rlim_cur = 9;
-
-
- if (setrlimit(RLIMIT_RTPRIO, &rl) < 0)
- g_error("setrlimit: %s", strerror (errno));
-
- uid = getuid();
- if (uid != 0 && geteuid() == 0) {
- g_assert(setresuid(uid, uid, uid) >= 0);
- g_assert(getuid() == uid);
- g_assert(geteuid() == uid);
- }
+ uid_t uid;
+ struct rlimit rl;
+
+ rl.rlim_max = 99;
+ rl.rlim_cur = 99;
+ if (setrlimit(RLIMIT_RTPRIO, &rl) < 0)
+ g_error("setrlimit: %s", strerror (errno));
+
+ uid = getuid();
+ if (uid != 0 && geteuid() == 0) {
+ g_assert(setresuid(uid, uid, uid) >= 0);
+ g_assert(getuid() == uid);
+ g_assert(geteuid() == uid);
}
#endif
--
1.5.6.5
More information about the telepathy-commits
mailing list