[telepathy-stream-engine/master] Set the rttime rlimit
Olivier Crête
olivier.crete at collabora.co.uk
Mon Jul 13 13:09:57 PDT 2009
---
src/stream-engine-main.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/stream-engine-main.c b/src/stream-engine-main.c
index 73afb5b..a84e0f0 100644
--- a/src/stream-engine-main.c
+++ b/src/stream-engine-main.c
@@ -27,6 +27,10 @@
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/time.h>
+
+#ifndef RLIMIT_RTTIME
+# define RLIMIT_RTTIME 15
+#endif
#endif /* USE_REALTIME */
#include <signal.h>
@@ -226,7 +230,13 @@ int main(int argc, char **argv)
rl.rlim_max = 99;
rl.rlim_cur = 99;
if (setrlimit(RLIMIT_RTPRIO, &rl) < 0)
- g_error("setrlimit: %s", strerror (errno));
+ g_warning("setrlimit rtprio: %s", strerror (errno));
+
+ rl.rlim_max = rl.rlim_cur = 50*1000;
+
+ if (setrlimit(RLIMIT_RTTIME, &rl) < 0)
+ g_warning("setrlimit rttime: %s", strerror (errno));
+
uid = getuid();
if (uid != 0 && geteuid() == 0) {
--
1.5.6.5
More information about the telepathy-commits
mailing list