bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

additional limits


From: Ulrich Drepper
Subject: additional limits
Date: Thu, 12 Aug 2004 12:21:04 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040807

Recent Linux kernels have resource limits which are currently not
covered by the ulimit builtin.  The attached patch is a proposal for
adding support.  Beside the question whether the support should be added
in the first place I think the only remaining issue is the character
used to denote the limit on the command line.  I tried to be as
reasonable as possible.

Please let me know whether you agree and if yes, what you intend to add
to your sources?  Thanks,

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
--- builtins/ulimit.def-save    2004-08-12 12:02:01.871880144 -0700
+++ builtins/ulimit.def 2004-08-12 12:15:22.034236976 -0700
@@ -200,6 +200,9 @@
   { 'd',       RLIMIT_DATA,  1024,     "data seg size",        "kbytes" },
 #endif
   { 'f',       RLIMIT_FILESIZE, 1024,  "file size",            "blocks" },
+#ifdef RLIMIT_SIGPENDING
+  { 'i',       RLIMIT_SIGPENDING, 1,   "pending signals",      (char *)NULL},
+#endif
 #ifdef RLIMIT_MEMLOCK
   { 'l',       RLIMIT_MEMLOCK, 1024,   "max locked memory",    "kbytes" },
 #endif
@@ -207,7 +210,13 @@
   { 'm',       RLIMIT_RSS,   1024,     "max memory size",      "kbytes" },
 #endif /* RLIMIT_RSS */
   { 'n',       RLIMIT_OPENFILES, 1,    "open files",           (char *)NULL},
+#ifdef RLIMIT_LOCKS
+  { 'o',       RLIMIT_LOCKS, 1,        "file locks",           (char *)NULL},
+#endif
   { 'p',       RLIMIT_PIPESIZE, 512,   "pipe size",            "512 bytes" },
+#ifdef RLIMIT_MSGQUEUE
+  { 'q',       RLIMIT_MSGQUEUE, 1,     "POSIX message queues", "bytes" },
+#endif
 #ifdef RLIMIT_STACK
   { 's',       RLIMIT_STACK, 1024,     "stack size",           "kbytes" },
 #endif
@@ -670,7 +679,7 @@
       else
         sprintf (unitstr, "(-%c) ", limits[limind].option);
 
-      printf ("%-18s %16s", limits[limind].description, unitstr);
+      printf ("%-20s %16s", limits[limind].description, unitstr);
     }
   if (curlim == RLIM_INFINITY)
     puts ("unlimited");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]