summaryrefslogtreecommitdiff
path: root/src/misc/prlimit.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-01-20 22:10:47 -0500
committerRich Felker <dalias@aerifal.cx>2012-01-20 22:10:47 -0500
commit26f38328d66f4bd525e9d21a9245ba4c54d6ca10 (patch)
tree8b98756234e60b896cbbe0f17b5ffc84fbcc2f58 /src/misc/prlimit.c
parent0b6dc0974426238cfe8fbb01ef64e7911f2da678 (diff)
downloadmusl-26f38328d66f4bd525e9d21a9245ba4c54d6ca10.tar.gz
add prlimit syscall wrapper
Diffstat (limited to 'src/misc/prlimit.c')
-rw-r--r--src/misc/prlimit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/misc/prlimit.c b/src/misc/prlimit.c
new file mode 100644
index 00000000..b9dbb446
--- /dev/null
+++ b/src/misc/prlimit.c
@@ -0,0 +1,8 @@
+#include <unistd.h>
+#include <sys/resource.h>
+#include "syscall.h"
+
+int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlimit *old_limit)
+{
+ return syscall(SYS_prlimit64, pid, resource, new_limit, old_limit);
+}