mirror of
https://github.com/RGBCube/serenity
synced 2025-07-30 19:17:35 +00:00
Ports: Update oksh's patches to use git patches
This commit is contained in:
parent
bb8febffac
commit
7077ce7779
6 changed files with 93 additions and 2 deletions
83
Ports/oksh/patches/0004-Disable-rlimit.patch
Normal file
83
Ports/oksh/patches/0004-Disable-rlimit.patch
Normal file
|
@ -0,0 +1,83 @@
|
|||
From 072da9d917bd529cf55973de264c1d288cbf7138 Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
|
||||
Date: Mon, 5 Apr 2021 22:58:01 +0200
|
||||
Subject: [PATCH 4/5] Disable rlimit
|
||||
|
||||
Serenity does not have rlimit support.
|
||||
---
|
||||
c_ulimit.c | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
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);
|
||||
- }
|
||||
+ }*/
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue