mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
8b0f1f816b
Currently has some problems such as not killing jobs when (ctrl + c) and depends on an implementation of sigsuspend.
70 lines
2 KiB
Diff
70 lines
2 KiB
Diff
diff --git a/c_ulimit.c b/c_ulimit.c
|
|
index 65e0cca..587f08a 100644
|
|
--- a/c_ulimit.c
|
|
+++ b/c_ulimit.c
|
|
@@ -45,15 +45,15 @@ c_ulimit(char **wp)
|
|
{
|
|
static const struct limits limits[] = {
|
|
/* Do not use options -H, -S or -a or change the order. */
|
|
- { "time(cpu-seconds)", RLIMIT_CPU, 1, 't' },
|
|
- { "file(blocks)", RLIMIT_FSIZE, 512, 'f' },
|
|
- { "coredump(blocks)", RLIMIT_CORE, 512, 'c' },
|
|
- { "data(kbytes)", RLIMIT_DATA, 1024, 'd' },
|
|
- { "stack(kbytes)", RLIMIT_STACK, 1024, 's' },
|
|
- { "lockedmem(kbytes)", RLIMIT_MEMLOCK, 1024, 'l' },
|
|
- { "memory(kbytes)", RLIMIT_RSS, 1024, 'm' },
|
|
- { "nofiles(descriptors)", RLIMIT_NOFILE, 1, 'n' },
|
|
- { "processes", RLIMIT_NPROC, 1, 'p' },
|
|
+ { "time(cpu-seconds)", 1, 1, 't' },
|
|
+ { "file(blocks)", 512, 512, 'f' },
|
|
+ { "coredump(blocks)", 512, 512, 'c' },
|
|
+ { "data(kbytes)", 1024, 1024, 'd' },
|
|
+ { "stack(kbytes)", 1024, 1024, 's' },
|
|
+ { "lockedmem(kbytes)", 1024, 1024, 'l' },
|
|
+ { "memory(kbytes)", 1024, 1024, 'm' },
|
|
+ { "nofiles(descriptors)", 1, 1, 'n' },
|
|
+ { "processes", 1, 1, 'p' },
|
|
{ NULL }
|
|
};
|
|
const char *options = "HSat#f#c#d#s#l#m#n#p#";
|
|
@@ -133,7 +133,7 @@ c_ulimit(char **wp)
|
|
|
|
static int
|
|
set_ulimit(const struct limits *l, const char *v, int how)
|
|
-{
|
|
+{/*
|
|
rlim_t val = 0;
|
|
struct rlimit limit;
|
|
|
|
@@ -150,7 +150,7 @@ set_ulimit(const struct limits *l, const char *v, int how)
|
|
* If this causes problems, will have to add parameter to
|
|
* evaluate() to control if unset params are 0 or an error.
|
|
*/
|
|
- if (!rval && !digit(v[0])) {
|
|
+/* if (!rval && !digit(v[0])) {
|
|
bi_errorf("invalid limit: %s", v);
|
|
return 1;
|
|
}
|
|
@@ -169,13 +169,13 @@ set_ulimit(const struct limits *l, const char *v, int how)
|
|
bi_errorf("bad -%c limit: %s", l->option,
|
|
strerror(errno));
|
|
return 1;
|
|
- }
|
|
+ }*/
|
|
return 0;
|
|
}
|
|
|
|
static void
|
|
print_ulimit(const struct limits *l, int how)
|
|
-{
|
|
+{/*
|
|
rlim_t val = 0;
|
|
struct rlimit limit;
|
|
|
|
@@ -189,5 +189,5 @@ print_ulimit(const struct limits *l, int how)
|
|
else {
|
|
val /= l->factor;
|
|
shprintf("%" PRIi64 "\n", (int64_t) val);
|
|
- }
|
|
+ }*/
|
|
}
|