commit - 1a35c1bc90d05a6bac56e2602a0bcc2109796fce
commit + b48e2ddb7c7f3bec51c4be31a1484677022384e8
blob - d781faafd2c372bd139bef6f3b37d18ffca12f5b
blob + f2cc6ae451f6713619f46c3e78b199f13c5b4ea1
--- lib/object.c
+++ lib/object.c
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/syslimits.h>
+#include <sys/resource.h>
#include <errno.h>
#include <fcntl.h>
return NULL;
}
+void
+set_max_datasize(void)
+{
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_DATA, &rl) != 0)
+ return;
+
+ rl.rlim_cur = rl.rlim_max;
+ setrlimit(RLIMIT_DATA, &rl);
+}
+
static const struct got_error *
start_pack_privsep_child(struct got_pack *pack, struct got_packidx *packidx)
{
err = got_error_from_errno("fork");
goto done;
} else if (pid == 0) {
+ set_max_datasize();
exec_privsep_child(imsg_fds, GOT_PATH_PROG_READ_PACK,
pack->path_packfile);
/* not reached */