[linux-audio-user] Re: ubuntu studio -rt
Ismael Valladolid Torres
ivalladt at punkass.com
Thu Feb 23 10:19:50 EST 2006
Dana Olson escribe:
> Yeah, I just applied the 0.76 patch, fixed the README failure by hand
> and re-made the patch for 0.79, so it is identical, really.
Not identical, your 0.79 patch is not including the changes to
limits.conf present in the 0.76 patch.
I've corrected it, find it attached and tell me if it's ok.
Cordially, Ismael
--
mí, myself et moi http://lamediahostia.blogspot.com/
http://www.flickr.com/photos/ivalladt/
-------------- next part --------------
diff -ru pam-0.79/Linux-PAM/modules/pam_limits/limits.skel pam-0.79-patched/Linux-PAM/modules/pam_limits/limits.skel
--- pam-0.79/Linux-PAM/modules/pam_limits/limits.skel 2002-09-15 16:08:50.000000000 -0400
+++ pam-0.79-patched/Linux-PAM/modules/pam_limits/limits.skel 2006-02-08 03:39:26.000000000 -0500
@@ -42,4 +42,8 @@
#ftp hard nproc 0
#@student - maxlogins 4
+ at audio - nice -10
+ at audio - rtprio 99
+ at audio - memlock 250000
+
# End of file
diff -ru pam-0.79/Linux-PAM/modules/pam_limits/pam_limits.c pam-0.79-patched/Linux-PAM/modules/pam_limits/pam_limits.c
--- pam-0.79/Linux-PAM/modules/pam_limits/pam_limits.c 2006-02-05 20:55:59.000000000 -0500
+++ pam-0.79-patched/Linux-PAM/modules/pam_limits/pam_limits.c 2006-02-05 20:57:24.000000000 -0500
@@ -34,6 +34,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
+/* hack: glibc-2.3.6 doesn't yet know about these yet */
+#define RLIMIT_NICE 13
+#define RLIMIT_RTPRIO 14
+#undef RLIM_NLIMITS
+#define RLIM_NLIMITS 15
#include <utmp.h>
#ifndef UT_USER /* some systems have ut_name instead of ut_user */
@@ -327,6 +332,14 @@
else if (strcmp(lim_item, "msgqueue") == 0)
limit_item = RLIMIT_MSGQUEUE;
#endif
+#ifdef RLIMIT_RTPRIO
+ else if (strcmp(lim_item, "rtprio") == 0)
+ limit_item = RLIMIT_RTPRIO;
+#endif
+#ifdef RLIMIT_NICE
+ else if (strcmp(lim_item, "nice") == 0)
+ limit_item = RLIMIT_NICE;
+#endif
else if (strcmp(lim_item, "maxlogins") == 0) {
limit_item = LIMIT_LOGIN;
pl->flag_numsyslogins = 0;
@@ -399,6 +412,15 @@
#endif
limit_value *= 1024;
break;
+#ifdef RLIMIT_NICE
+ case RLIMIT_NICE:
+ if (limit_value > 19)
+ limit_value = 19;
+ if (limit_value < -20)
+ limit_value = -20;
+ limit_value = 19 - limit_value;
+ break;
+#endif
}
if ( (limit_item != LIMIT_LOGIN)
Only in pam-0.79-patched/Linux-PAM/modules/pam_limits: pam_limits.c.orig
diff -ru pam-0.79/Linux-PAM/modules/pam_limits/README pam-0.79-patched/Linux-PAM/modules/pam_limits/README
--- pam-0.79/Linux-PAM/modules/pam_limits/README 2005-01-10 05:09:51.000000000 -0500
+++ pam-0.79-patched/Linux-PAM/modules/pam_limits/README 2006-02-05 20:58:52.000000000 -0500
@@ -42,6 +42,10 @@
- sigpending - max number of pending signals (Linux 2.6 and higher)
- msgqueue - max memory used by POSIX message queues (bytes)
(Linux 2.6 and higher)
+ - nice - max nice priority allowed to raise to. (Linux 2.6.12 and higher)
+ - rtprio - max realtime priority allowed for non-priviledged processes
+ (Linux 2.6.12 and higher)
+
Note, if you specify a type of '-' but neglect to supply the item and
value fields then the module will never enforce any limits on the
More information about the Linux-audio-user
mailing list