From dee567663dfbcb326eeef152ac16dfeb7480f5f2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 30 May 2015 21:45:25 -0700 Subject: [PATCH] ugetrlimit syscall --- src/library_syscall.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/library_syscall.js b/src/library_syscall.js index 553e26c03..b1b553b94 100644 --- a/src/library_syscall.js +++ b/src/library_syscall.js @@ -828,6 +828,14 @@ mergeInto(LibraryManager.library, { writeAsciiToMemory(cwd, buf); return buf; } + case 191: { // ugetrlimit + var resource = get(), rlim = get(); + {{{ makeSetValue('rlim', C_STRUCTS.rlimit.rlim_cur, '-1', 'i32') }}}; // RLIM_INFINITY + {{{ makeSetValue('rlim', C_STRUCTS.rlimit.rlim_cur + 4, '-1', 'i32') }}}; // RLIM_INFINITY + {{{ makeSetValue('rlim', C_STRUCTS.rlimit.rlim_max, '-1', 'i32') }}}; // RLIM_INFINITY + {{{ makeSetValue('rlim', C_STRUCTS.rlimit.rlim_max + 4, '-1', 'i32') }}}; // RLIM_INFINITY + return 0; // just report no limits + } case 192: { // mmap2 var addr = get(), len = get(), prot = get(), flags = get(), fd = get(), off = get() off <<= 12; // undo pgoffset